summaryrefslogtreecommitdiff
path: root/app-misc/smith/smith-0.1.0.ebuild
blob: e25c643d11332440b231a9e38da38f5186958ded (plain)
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
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
# Copyright 2026 BaldEagleOS Authors
# Distributed under the terms of the GNU General Public License v2

EAPI=8

# Generated from the release Cargo.lock, including test and target dependencies.
CRATES="
	ahash@0.8.12
	aho-corasick@1.1.5
	allocator-api2@0.2.21
	ambient-authority@0.0.2
	anstream@1.0.0
	anstyle@1.0.14
	anstyle-parse@1.0.0
	anstyle-query@1.1.5
	anstyle-wincon@3.0.11
	anyhow@1.0.104
	atomic-waker@1.1.2
	autocfg@1.5.1
	axum@0.8.9
	axum-core@0.5.6
	base64@0.22.1
	bit-set@0.8.0
	bit-vec@0.8.0
	bitflags@2.13.2
	block-buffer@0.10.4
	borrow-or-share@0.2.4
	bumpalo@3.20.3
	bytecount@0.6.9
	bytes@1.12.1
	cap-primitives@3.4.6
	cap-std@3.4.6
	cc@1.4.5
	cfg-if@1.0.4
	cfg_aliases@0.2.2
	chacha20@0.10.2
	clap@4.6.6
	clap_builder@4.6.6
	clap_derive@4.6.4
	clap_lex@1.1.0
	colorchoice@1.0.5
	cpufeatures@0.2.17
	cpufeatures@0.3.1
	crypto-common@0.1.7
	data-encoding@2.11.1
	digest@0.10.7
	displaydoc@0.2.7
	email_address@0.2.9
	equivalent@1.0.2
	errno@0.3.14
	fallible-iterator@0.3.0
	fallible-streaming-iterator@0.1.9
	fancy-regex@0.19.1
	fastrand@2.5.0
	find-msvc-tools@0.1.12
	fluent-uri@0.4.1
	foldhash@0.1.5
	foldhash@0.2.0
	foreign-types@0.3.2
	foreign-types-shared@0.1.1
	form_urlencoded@1.2.2
	fraction@0.17.0
	fs-set-times@0.20.3
	futures-channel@0.3.34
	futures-core@0.3.34
	futures-io@0.3.34
	futures-macro@0.3.34
	futures-sink@0.3.34
	futures-task@0.3.34
	futures-util@0.3.34
	generic-array@0.14.7
	getrandom@0.2.17
	getrandom@0.3.4
	getrandom@0.4.3
	hashbrown@0.15.5
	hashbrown@0.17.1
	hashlink@0.10.0
	heck@0.5.0
	http@1.5.0
	http-body@1.1.0
	http-body-util@0.1.5
	httparse@1.10.1
	httpdate@1.0.3
	hyper@1.11.1
	hyper-rustls@0.27.9
	hyper-util@0.1.20
	icu_collections@2.3.0
	icu_locale_core@2.3.0
	icu_normalizer@2.3.0
	icu_normalizer_data@2.3.0
	icu_properties@2.3.0
	icu_properties_data@2.3.0
	icu_provider@2.3.1
	idna@1.1.0
	idna_adapter@1.2.2
	indexmap@2.14.2
	io-extras@0.18.4
	io-lifetimes@2.0.4
	ipnet@2.12.2
	is_terminal_polyfill@1.70.2
	itoa@1.0.18
	js-sys@0.3.105
	jsonschema@0.54.0
	jsonschema-regex@0.54.0
	jsonschema-value@0.54.0
	libc@0.2.189
	libsqlite3-sys@0.35.0
	linux-raw-sys@0.12.1
	litemap@0.8.3
	lock_api@0.4.14
	log@0.4.34
	lru-slab@0.1.2
	matchit@0.8.4
	maybe-owned@0.3.4
	memchr@2.8.3
	micromap@0.3.0
	mime@0.3.17
	mio@1.2.3
	num@0.4.3
	num-bigint@0.4.8
	num-cmp@0.1.0
	num-complex@0.4.6
	num-integer@0.1.47
	num-iter@0.1.46
	num-rational@0.4.2
	num-traits@0.2.19
	once_cell@1.21.4
	once_cell_polyfill@1.70.2
	openssl@0.10.81
	openssl-macros@0.1.1
	openssl-sys@0.9.117
	outref@0.5.2
	parking_lot@0.12.5
	parking_lot_core@0.9.12
	percent-encoding@2.3.2
	pin-project-lite@0.2.17
	pkg-config@0.3.34
	potential_utf@0.1.6
	ppv-lite86@0.2.21
	proc-macro2@1.0.107
	quinn@0.11.11
	quinn-proto@0.11.17
	quinn-udp@0.5.15
	quote@1.0.47
	r-efi@5.3.0
	r-efi@6.0.0
	rand@0.10.2
	rand@0.9.5
	rand_chacha@0.9.0
	rand_core@0.10.1
	rand_core@0.9.5
	rand_pcg@0.10.2
	redox_syscall@0.5.18
	ref-cast@1.0.27
	ref-cast-impl@1.0.27
	referencing@0.54.0
	regex@1.13.1
	regex-automata@0.4.18
	regex-syntax@0.8.11
	reqwest@0.12.28
	ring@0.17.14
	rusqlite@0.37.0
	rustc-hash@2.1.3
	rustix@1.1.4
	rustix-linux-procfs@0.1.1
	rustls@0.23.44
	rustls-pemfile@2.2.0
	rustls-pki-types@1.15.1
	rustls-webpki@0.103.15
	rustversion@1.0.23
	ryu@1.0.23
	scopeguard@1.2.0
	serde@1.0.229
	serde_core@1.0.229
	serde_derive@1.0.229
	serde_json@1.0.151
	serde_path_to_error@0.1.20
	serde_spanned@1.1.1
	serde_urlencoded@0.7.1
	sha2@0.10.9
	shlex@2.0.1
	signal-hook-registry@1.4.8
	slab@0.4.12
	smallvec@1.16.0
	socket2@0.6.5
	stable_deref_trait@1.2.1
	strsim@0.11.1
	strum@0.28.0
	strum_macros@0.28.0
	subtle@2.6.1
	syn@2.0.119
	syn@3.0.5
	sync_wrapper@1.0.2
	synstructure@0.13.2
	tempfile@3.27.0
	thiserror@2.0.20
	thiserror-impl@2.0.20
	tinystr@0.8.4
	tinyvec@1.13.2
	tinyvec_macros@0.1.1
	tokio@1.53.1
	tokio-macros@2.7.2
	tokio-rustls@0.26.5
	tokio-util@0.7.19
	toml@0.9.12+spec-1.1.0
	toml_datetime@0.7.5+spec-1.1.0
	toml_parser@1.1.3+spec-1.1.0
	toml_writer@1.1.2+spec-1.1.0
	tower@0.5.3
	tower-http@0.6.11
	tower-layer@0.3.3
	tower-service@0.3.3
	tracing@0.1.44
	tracing-core@0.1.36
	try-lock@0.2.5
	typenum@1.20.1
	ulid@1.2.1
	unicode-general-category@1.1.0
	unicode-ident@1.0.24
	untrusted@0.9.0
	url@2.5.8
	utf8_iter@1.0.4
	utf8parse@0.2.2
	uuid@1.26.1
	uuid-simd@0.8.0
	vcpkg@0.2.15
	version_check@0.9.5
	vsimd@0.8.0
	want@0.3.1
	wasi@0.11.1+wasi-snapshot-preview1
	wasip2@1.0.4+wasi-0.2.12
	wasm-bindgen@0.2.128
	wasm-bindgen-futures@0.4.78
	wasm-bindgen-macro@0.2.128
	wasm-bindgen-macro-support@0.2.128
	wasm-bindgen-shared@0.2.128
	wasm-streams@0.4.2
	web-sys@0.3.105
	web-time@1.1.0
	webpki-roots@1.0.9
	windows-link@0.2.1
	windows-sys@0.52.0
	windows-sys@0.59.0
	windows-sys@0.61.2
	windows-targets@0.52.6
	windows_aarch64_gnullvm@0.52.6
	windows_aarch64_msvc@0.52.6
	windows_i686_gnu@0.52.6
	windows_i686_gnullvm@0.52.6
	windows_i686_msvc@0.52.6
	windows_x86_64_gnu@0.52.6
	windows_x86_64_gnullvm@0.52.6
	windows_x86_64_msvc@0.52.6
	winnow@0.7.15
	winnow@1.0.4
	winx@0.36.4
	wit-bindgen@0.57.1
	writeable@0.6.4
	yoke@0.8.3
	yoke-derive@0.8.2
	zerocopy@0.8.57
	zerocopy-derive@0.8.57
	zerofrom@0.1.8
	zerofrom-derive@0.1.7
	zeroize@1.9.0
	zerotrie@0.2.5
	zerovec@0.11.8
	zerovec-derive@0.11.6
	zmij@1.0.23
"
RUST_MIN_VER="1.88.0"

inherit cargo

DESCRIPTION="Agent Smith conversational CLI with local tools and central AIRouter sessions"
HOMEPAGE="https://trunkmasters.com"
SRC_URI="
	https://distfiles.baldeagleos.com/${P}.tar.xz
	${CARGO_CRATE_URIS}
"

# Includes the statically linked Rust dependencies.
LICENSE="Apache-2.0 Apache-2.0-with-LLVM-exceptions BSD CDLA-Permissive-2.0 ISC MIT MIT-0 Unicode-3.0 ZLIB"
SLOT="0"
KEYWORDS="~amd64"
IUSE="sandbox test"
RESTRICT="!test? ( test )"
# Integration fixtures bind loopback sockets; they do not contact live services.
PROPERTIES="test? ( test_network )"

DEPEND="
	dev-db/sqlite:3
	dev-libs/openssl:0=
"
RDEPEND="
	${DEPEND}
	net-misc/openssh
	sandbox? ( sys-apps/bubblewrap )
"
BDEPEND="
	virtual/pkgconfig
	test? ( app-shells/bash sys-apps/coreutils )
"

src_configure() {
	cargo_src_configure --frozen
}

src_compile() {
	cargo_src_compile --bin smith
}

src_test() {
	# The isolated sshd fixture needs root; bubblewrap namespace fixtures
	# cannot run reliably inside Portage's own sandbox. Run these separately
	# when qualifying upstream, along with the opt-in live rotation test.
	local CARGO_SKIP_TESTS=(
		openssh_bootstrap_and_installed_shape_cli
		mtls_local_tools_and_central_resume_use_real_agent_state_machine
		workspace_escape_conflicts_and_uncertain_operations_are_rejected
	)
	cargo_src_test --test end_to_end
}

src_install() {
	dobin "$(cargo_target_dir)/smith"
	dodoc README.md
	dodoc config/smith.example.toml
}

pkg_postinst() {
	elog "Run smith to start a conversation in the current directory."
	elog "It uses your existing SSH access to alpha.trunkmasters.com."
	elog "The SSH account and host key must already be configured and authorized."
	elog "Optional settings: ~/.config/smith/smith.toml (example in /usr/share/doc/${PF})."
}