Repository navigation
Expand file tree
/
Copy pathmix.exs
More file actions
229 lines (216 loc) · 7.85 KB
/
Copy pathmix.exs
File metadata and controls
229 lines (216 loc) · 7.85 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
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
if bootstrap = System.get_env("MIX_WORKSPACE_OPS_BOOTSTRAP"), do: Code.require_file(bootstrap)
unless Code.ensure_loaded?(XlaTargetValidator) do
Code.require_file("build_support/xla_target_validator.exs", __DIR__)
end
# Load the XlaEnvPreflight Mix compiler eagerly so Mix can find it before
# the project's own `lib/` tree compiles. Compilers referenced from a
# project's `:compilers` list must be loadable before `mix compile`
# starts; placing the module under `lib/` would create a chicken-and-egg
# bootstrap problem (Mix would look for the compiler module before it
# has had a chance to compile `lib/`).
unless Code.ensure_loaded?(Mix.Tasks.Compile.XlaEnvPreflight) do
Code.require_file("build_support/mix_tasks_compile_xla_env_preflight.exs", __DIR__)
end
# Eager XLA_TARGET preflight: a project's :compilers list runs AFTER
# dependency compilation, so the in-project preflight compiler alone
# would not catch the EXLA-side failure mode. Calling the validator
# here, at mix.exs top level, catches mix test, mix compile,
# mix deps.compile, and mix deps.update -- all of which evaluate
# mix.exs before touching deps.
#
# When this mix.exs is being evaluated as a transitive dependency
# (our directory sits inside some parent project's deps/), defer
# entirely to that parent project's build configuration.
XlaTargetValidator.validate_root_project!(__DIR__)
defmodule TrinityCoordinator.MixProject do
use Mix.Project
@version "0.1.0"
def project do
[
app: :trinity_coordinator,
version: @version,
elixir: "~> 1.18",
description:
"An Elixir implementation of the TRINITY multi-agent orchestration router for routing language-model calls through a compact hidden-state router.",
source_url: "https://github.com/nshkrdotcom/trinity_coordinator",
homepage_url: "https://github.com/nshkrdotcom/trinity_coordinator",
start_permanent: Mix.env() == :prod,
package: package(),
docs: docs(),
compilers: [:xla_env_preflight] ++ Mix.compilers(),
elixirc_paths: elixirc_paths(Mix.env()),
dialyzer: [
plt_add_apps: [:mix],
plt_file: {:no_warn, "priv/plts/dialyzer.plt"}
],
deps: deps()
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
def cli do
[
preferred_envs: [
dialyzer: :dev,
credo: :dev
]
]
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger]
]
end
# Run "mix help deps" to learn about dependencies.
defp deps do
[
# {:dep_from_hexpm, "~> 0.3.0"},
# {:dep_from_git, git: "https://github.com/elixir-lang/my_dep.git", tag: "0.1.0"}
# Current published Nx/EXLA and Bumblebee include the fixes that
# previously required Git pins (see docs/bumblebee_unpin_playbook.md).
{:nx, "~> 1.0.0"},
{:exla, "~> 1.0.0"},
{:axon, "~> 0.9.0"},
{:bumblebee, "~> 0.8.0"},
# NOTE: EMLX is deliberately NOT listed here. Marking it
# optional: true would still cause Mix to fetch and start EMLX on
# any host (incl. Linux/CUDA), whose Metal/MLX NIF cannot load.
# Apple Silicon users add {:emlx, "~> 0.3"} to their own
# application's deps; the :emlx runtime profile then resolves to
# the EMLX.Backend at runtime via Code.ensure_loaded?/1. See
# guides/runtime_profiles.md.
workspace_dep({:inference, "~> 0.5.1"}),
workspace_dep({:agent_session_manager, "~> 0.17.3"}),
workspace_dep({:gemini_cli_sdk, "~> 0.2.0"}),
{:req, "~> 0.7.4"},
{:hf_hub, "~> 0.3.1"},
{:credo, "~> 1.7.19", only: :dev, runtime: false},
{:dialyxir, "~> 1.4.8", only: :dev, runtime: false},
{:ex_doc, "~> 0.40.4", only: :dev, runtime: false}
]
end
defp workspace_dep(committed) do
if function_exported?(MixWorkspaceOpsBootstrap, :dep, 2),
do: apply(MixWorkspaceOpsBootstrap, :dep, [committed, __DIR__]),
else: committed
end
defp package do
[
name: :trinity_coordinator,
licenses: ["MIT"],
maintainers: ["nshkrdotcom"],
links: %{
GitHub: "https://github.com/nshkrdotcom/trinity_coordinator"
},
files: [
"lib",
"mix.exs",
"README.md",
"CHANGELOG.md",
"LICENSE",
"AGENTS.md",
"assets",
"build_support",
"examples",
"guides",
"docs/*.md"
]
]
end
defp docs do
[
main: "overview",
source_ref: "v#{@version}",
source_url: "https://github.com/nshkrdotcom/trinity_coordinator",
extras: [
{"README.md", [filename: "overview", title: "Overview"]},
{"examples/README.md", [filename: "examples", title: "Examples"]},
"guides/onboarding.md",
"guides/current_direction.md",
"guides/system_architecture.md",
"guides/python_parity_reconstruction.md",
"guides/stage_checks_and_tolerances.md",
"guides/artifacts_and_export.md",
"guides/svd_generation_runbook.md",
"guides/service_buildout.md",
"guides/provider_service_hardening.md",
"guides/operations_qc.md",
"guides/troubleshooting.md",
"guides/runtime_profiles.md",
"guides/artifact_distribution.md",
"docs/sakana_svd_byte_match_rigor_plan.md",
"docs/sakana_svd_parity_debug_checklist.md",
"docs/elixir_svd_decomposition.md",
"docs/production_qwen_slm_profile.md",
"docs/coordination_head_variants.md",
"docs/trace_persistence.md",
"docs/configurable_provider_pools.md",
"docs/agent_slot_provider_mapping.md",
"docs/production_runbook.md",
"docs/bumblebee_unpin_playbook.md",
"docs/provider_smoke_tests.md",
"CHANGELOG.md",
"LICENSE"
],
groups_for_extras: [
Project: ["README.md", "CHANGELOG.md", "LICENSE"],
Examples: ["examples/README.md"],
"Start Here": [
"guides/onboarding.md",
"guides/current_direction.md",
"guides/system_architecture.md"
],
"Parity Guides": [
"guides/python_parity_reconstruction.md",
"guides/stage_checks_and_tolerances.md",
"guides/artifacts_and_export.md",
"guides/svd_generation_runbook.md"
],
"Service Buildout": [
"guides/service_buildout.md",
"guides/provider_service_hardening.md",
"guides/operations_qc.md",
"guides/troubleshooting.md",
"guides/runtime_profiles.md",
"guides/artifact_distribution.md"
],
"Operator Runbooks": [
"docs/agent_slot_provider_mapping.md",
"docs/production_runbook.md",
"docs/bumblebee_unpin_playbook.md"
],
"Reference Notes": [
"docs/sakana_svd_byte_match_rigor_plan.md",
"docs/sakana_svd_parity_debug_checklist.md",
"docs/elixir_svd_decomposition.md",
"docs/production_qwen_slm_profile.md",
"docs/coordination_head_variants.md",
"docs/trace_persistence.md",
"docs/configurable_provider_pools.md",
"docs/provider_smoke_tests.md"
]
],
groups_for_modules: [
Core: [
TrinityCoordinator,
TrinityCoordinator.Extractor,
TrinityCoordinator.CoordinationHead,
TrinityCoordinator.Orchestrator
],
Runtime: [
TrinityCoordinator.Runtime,
TrinityCoordinator.StateManager,
TrinityCoordinator.RoleInjector,
TrinityCoordinator.Thinker,
TrinityCoordinator.Verifier,
TrinityCoordinator.AgentPool,
TrinityCoordinator.AgentPool.Adapter,
TrinityCoordinator.AgentPool.Inference,
TrinityCoordinator.AgentPool.OpenAI
]
],
skip_undefined_reference_warnings_on: ["CHANGELOG.md"]
]
end
end