-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathmix.exs
More file actions
202 lines (178 loc) · 5.15 KB
/
Copy pathmix.exs
File metadata and controls
202 lines (178 loc) · 5.15 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
# Version stamp source of truth.
# Keep the following docs in sync when bumping @version or the build counter:
# - README.md (header block)
# - docs/ARCHITECTURE.md (Document version line)
# - docs/API.md (Document version line + /health example response)
# See docs/orders/2026-05-21-doc-reconciliation-report.md.
defmodule Giulia.MixProject do
use Mix.Project
@version "0.3.8"
# Build number - increment on each release
@build 165
def project do
[
app: :giulia,
version: @version,
build: @build,
elixir: "~> 1.19",
start_permanent: Mix.env() == :prod,
deps: deps(),
escript: escript(),
releases: releases(),
aliases: aliases(),
dialyzer: dialyzer(),
docs: docs()
]
end
def cli do
[
preferred_envs: [
check: :test,
"check.strict": :test,
"check.fast": :test,
credo: :test,
dialyzer: :dev,
sobelow: :dev
]
]
end
def application do
[
extra_applications: [:logger, :tools],
mod: {Giulia.Application, []}
]
end
defp escript do
[
main_module: Giulia.Client,
name: "giulia"
]
end
defp releases do
[
# The Daemon Release (for Docker)
# This is the long-running BEAM node that clients connect to
giulia: [
include_executables_for: [:unix],
applications: [runtime_tools: :permanent],
# Build-time release default; the runtime cookie comes from RELEASE_COOKIE
# via rel/vm.args.eex. Mix accepts a string here — no atom needed.
cookie: System.get_env("GIULIA_COOKIE", "giulia_dev"),
steps: [:assemble],
rel_templates_path: "rel"
],
# The Thin Client Release (for Burrito binary)
# This is compiled to a native binary and distributed to users
giulia_client: [
include_executables_for: [:unix, :windows],
applications: [runtime_tools: :temporary],
steps: [:assemble, &Burrito.wrap/1],
burrito: [
targets: [
windows: [os: :windows, cpu: :x86_64],
linux: [os: :linux, cpu: :x86_64],
macos: [os: :darwin, cpu: :x86_64],
macos_arm: [os: :darwin, cpu: :aarch64]
]
]
]
]
end
defp deps do
[
# HTTP client
{:req, "~> 0.5"},
# HTTP server (daemon API)
{:bandit, "~> 1.0"},
{:plug, "~> 1.16"},
# TUI rendering
{:owl, "~> 0.11"},
# JSON parsing
{:jason, "~> 1.4"},
# Schema validation
{:ecto, "~> 3.11"},
# AST parsing (pure Elixir)
{:sourceror, "~> 1.7"},
# SQLite for conversation history
{:exqlite, "~> 0.20"},
# Knowledge graph (pure Elixir, no NIFs)
{:libgraph, "~> 0.16"},
# Semantic search (Hierarchical Concept Search)
{:nx, "~> 0.10"},
{:exla, "~> 0.10"},
{:bumblebee, "~> 0.6"},
{:axon, "~> 0.6"},
# Persistent key-value store (pure Elixir, crash-safe)
{:cubdb, "~> 2.0"},
# Binary compilation (client only)
{:burrito, "~> 1.0", runtime: false},
# MCP (Model Context Protocol) server
{:anubis_mcp, "~> 1.0"},
# Property-based testing (test-only)
{:stream_data, "~> 1.1", only: [:dev, :test], runtime: false},
# --- Quality tooling (dev/test only) ---
{:credo, "~> 1.7", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.4", only: [:dev, :test], runtime: false},
{:sobelow, "~> 0.13", only: [:dev, :test], runtime: false},
{:ex_doc, "~> 0.34", only: :dev, runtime: false}
]
end
defp aliases do
[
# Standard check — what every commit should pass
check: [
"format --check-formatted",
"compile --warnings-as-errors",
"credo --strict",
"test"
],
# Strict — release gate; adds Dialyzer and Sobelow
"check.strict": [
"format --check-formatted",
"compile --warnings-as-errors",
"credo --strict",
"sobelow --config",
"dialyzer",
"test --cover"
],
# Fast feedback for the inner dev loop
"check.fast": [
"compile --warnings-as-errors",
"credo --strict",
"test --stale"
]
]
end
defp dialyzer do
[
plt_file: {:no_warn, "priv/plts/giulia.plt"},
plt_add_apps: [:mix, :ex_unit],
flags: [
# :unmatched_returns intentionally omitted — at Phase 2c it produced 50
# findings (27% of the Dialyzer total), almost all intentional
# fire-and-forget calls (Logger, GenServer.cast, telemetry, ETS writes).
# It fires on pattern, not risk. See docs/orders/quality-tooling/phase-2-dialyzer.md.
:error_handling,
:missing_return,
:extra_return,
:no_improper_lists
],
ignore_warnings: ".dialyzer_ignore.exs",
list_unused_filters: true
]
end
defp docs do
[
main: "readme",
extras: [
"README.md",
"docs/ARCHITECTURE.md",
"docs/API.md",
"CONTRIBUTING.md",
"SECURITY.md"
],
source_url: "https://github.com/thatsme/giulia",
source_ref: "v#{@version}"
]
end
end