Repository navigation
Expand file tree
/
Copy pathmix.exs
More file actions
218 lines (198 loc) · 7.75 KB
/
Copy pathmix.exs
File metadata and controls
218 lines (198 loc) · 7.75 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
if bootstrap = System.get_env("MIX_WORKSPACE_OPS_BOOTSTRAP"), do: Code.require_file(bootstrap)
defmodule CliSubprocessCore.MixProject do
use Mix.Project
@version "0.9.3"
@source_url "https://github.com/nshkrdotcom/cli_subprocess_core"
@homepage_url "https://hex.pm/packages/cli_subprocess_core"
@docs_url "https://hexdocs.pm/cli_subprocess_core"
def project do
[
app: :cli_subprocess_core,
name: "CliSubprocessCore",
version: @version,
elixir: "~> 1.18",
elixirc_paths: elixirc_paths(Mix.env()),
start_permanent: Mix.env() == :prod,
deps: deps(),
aliases: aliases(),
homepage_url: @homepage_url,
source_url: @source_url,
docs: docs(),
package: package(),
description: description(),
dialyzer: dialyzer()
]
end
defp elixirc_paths(:test), do: ["lib", "test/support"]
defp elixirc_paths(_), do: ["lib"]
defp docs do
[
main: "overview",
source_ref: "v#{@version}",
homepage_url: @homepage_url,
assets: %{"assets" => "assets"},
logo: "assets/cli_subprocess_core.svg",
extras: [
"README.md": [title: "Overview", filename: "overview"],
"guides/provider-model-audit-2026-09-29.md": [title: "Provider Model Audit"],
"guides/release-train-2026-09-29.md": [title: "2026-09-29 Release Train"],
"CHANGELOG.md": [title: "Changelog"],
LICENSE: [title: "License"],
"guides/getting-started.md": [title: "Getting Started"],
"guides/execution-surface-compatibility.md": [title: "Execution Surface Compatibility"],
"guides/event-and-payload-model.md": [title: "Event And Payload Model"],
"guides/recovery-envelope.md": [title: "Recovery Envelope"],
"guides/provider-profile-contract.md": [title: "Provider Profile Contract"],
"guides/custom-provider-profiles.md": [title: "Custom Provider Profiles"],
"guides/built-in-provider-profiles.md": [title: "Built-In Provider Profiles"],
"guides/provider-feature-manifests.md": [title: "Provider Feature Manifests"],
"guides/developer-guide-model-registry.md": [title: "Developer Guide: Model Registry"],
"guides/developer-guide-runtime-layers.md": [title: "Developer Guide: Runtime Layers"],
"guides/developer-guide-claude-backends.md": [title: "Developer Guide: Claude Backends"],
"guides/developer-guide-codex-backends.md": [title: "Developer Guide: Codex Backends"],
"guides/developer-guide-adding-transports.md": [
title: "Developer Guide: Adding Transports"
],
"guides/developer-guide-provider-profiles.md": [
title: "Developer Guide: Provider Profiles"
],
"guides/command-api.md": [title: "Command API"],
"guides/raw-transport.md": [title: "Raw Sessions And Transport"],
"guides/channel-api.md": [title: "Channel API"],
"guides/json-rpc.md": [title: "JSON-RPC"],
"guides/session-api.md": [title: "Session API"],
"guides/shutdown-and-timeouts.md": [title: "Shutdown And Timeouts"],
"examples/README.md": [title: "Examples", filename: "examples"],
"guides/testing-and-conformance.md": [title: "Testing And Conformance"]
],
groups_for_extras: [
"Project Overview": ["README.md"],
Examples: ["examples/README.md"],
"Provider Profiles": [
"guides/provider-profile-contract.md",
"guides/custom-provider-profiles.md",
"guides/built-in-provider-profiles.md",
"guides/provider-feature-manifests.md"
],
"Developer Guides": [
"guides/developer-guide-model-registry.md",
"guides/developer-guide-runtime-layers.md",
"guides/developer-guide-claude-backends.md",
"guides/developer-guide-codex-backends.md",
"guides/developer-guide-adding-transports.md",
"guides/developer-guide-provider-profiles.md"
],
"Runtime & APIs": [
"guides/getting-started.md",
"guides/execution-surface-compatibility.md",
"guides/recovery-envelope.md",
"guides/raw-transport.md",
"guides/event-and-payload-model.md",
"guides/command-api.md",
"guides/channel-api.md",
"guides/json-rpc.md",
"guides/session-api.md"
],
"Operations & Conformance": [
"guides/shutdown-and-timeouts.md",
"guides/testing-and-conformance.md"
],
"Project Reference": ["CHANGELOG.md", "LICENSE"]
],
formatters: ["html", "epub", "markdown"],
source_url: @source_url
]
end
defp package do
[
name: "cli_subprocess_core",
description: description(),
files: ~w(lib priv/models guides examples mix.exs README* CHANGELOG* LICENSE* assets),
licenses: ["MIT"],
maintainers: ["nshkrdotcom"],
links: %{
"GitHub" => @source_url,
"Hex" => @homepage_url,
"HexDocs" => @docs_url,
"Changelog" => "#{@source_url}/blob/main/CHANGELOG.md",
"License" => "#{@source_url}/blob/main/LICENSE"
}
]
end
defp description do
"Shared CLI subprocess runtime foundation with first-party common provider profiles."
end
# Run "mix help compile.app" to learn about applications.
def application do
[
extra_applications: [:logger, :inets, :ssl, :crypto],
mod: {CliSubprocessCore.Application, []}
]
end
def cli do
[preferred_envs: ["test.live": :test]]
end
defp deps do
execution_plane = execution_plane_dep()
[execution_plane, execution_plane_process_dep(), execution_plane_jsonrpc_dep()] ++
local_ground_overrides(execution_plane) ++
[
{:jason, "~> 1.4.5"},
{:zoi, "~> 0.18.11"},
{:ex_doc, "~> 0.40.4", only: :dev, runtime: false},
{:credo, "~> 1.7.19", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.4.8", only: :dev, runtime: false}
]
end
defp execution_plane_dep, do: workspace_dep({:execution_plane, "~> 0.3.0"})
defp execution_plane_process_dep,
do: workspace_dep({:execution_plane_process, "~> 0.3.1"})
defp execution_plane_jsonrpc_dep,
do: workspace_dep({:execution_plane_jsonrpc, "~> 0.2.0"})
defp workspace_dep(committed) do
if function_exported?(MixWorkspaceOpsBootstrap, :dep, 2),
do: apply(MixWorkspaceOpsBootstrap, :dep, [committed, __DIR__]),
else: committed
end
# The Execution Plane core package declares ordinary Hex Ground
# dependencies. Until those parents are published, local and source
# consumers override them at the top level. Hex mode omits these entries, so
# they never enter the published CLI package dependency surface.
defp local_ground_overrides({:execution_plane, opts}) when is_list(opts) do
if local_ground_paths_available?() do
[
workspace_dep({:ground_plane_contracts, "~> 0.1.1", override: true}),
workspace_dep({:ground_plane_persistence_policy, "~> 0.1.0", override: true})
]
else
[]
end
end
defp local_ground_overrides(_execution_plane), do: []
defp local_ground_paths_available? do
File.dir?(Path.expand("../ground_plane/core/ground_plane_contracts", __DIR__)) and
File.dir?(Path.expand("../ground_plane/core/persistence_policy", __DIR__))
end
defp dialyzer do
[
plt_add_apps: [:mix, :ex_unit],
plt_core_path: "priv/plts/core",
plt_local_path: "priv/plts",
flags: [:error_handling, :underspecs]
]
end
defp aliases do
[
ci: [
"format --check-formatted",
"compile --warnings-as-errors",
"cmd ./scripts/atom_guard.sh",
"cmd ./scripts/secrets_guard.sh",
"credo --strict",
"cmd env MIX_ENV=test mix test",
"dialyzer"
],
"test.live": ["test --include live"]
]
end
end