forked from Dicklesworthstone/pi_agent_rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
352 lines (297 loc) · 9.7 KB
/
Copy pathCargo.toml
File metadata and controls
352 lines (297 loc) · 9.7 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
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
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
[package]
name = "pi_agent_rust"
version = "0.1.15"
edition = "2024"
rust-version = "1.85"
description = "High-performance AI coding agent CLI - Rust port of Pi Agent"
authors = ["Jeffrey Emanuel"]
license-file = "LICENSE"
repository = "https://github.com/Dicklesworthstone/pi_agent_rust"
homepage = "https://github.com/Dicklesworthstone/pi_agent_rust"
documentation = "https://docs.rs/pi_agent_rust"
readme = "README.md"
keywords = ["ai", "cli", "coding-agent", "llm", "anthropic"]
categories = ["command-line-utilities", "development-tools"]
autobins = false
# Binary organization per bd-uuwgi.1/bd-uuwgi.2 classification:
# - SHIPPING: src/main.rs (pi) - main CLI binary
# - RETIRABLE: src/bin/pi_legacy_capture.rs (pending RULE 1 approval)
# - DEV-ONLY: moved to examples/ (21 files: ext_*, test_*, debug utilities)
include = [
"docs/extension-artifact-provenance.json",
"docs/wit/extension.wit",
"docs/provider-upstream-model-ids-snapshot.json",
"docs/schema/extension_protocol.json",
"legacy_pi_mono_code/pi-mono/packages/ai/src/models.generated.ts",
"Cargo.toml",
"LICENSE",
"README.md",
# Pulled in by `include_str!("../../CHANGELOG.md")` in
# src/interactive/commands.rs and src/interactive.rs — without it the
# `cargo publish --dry-run` verify step fails to build the packaged tarball.
"CHANGELOG.md",
"build.rs",
"src/**",
]
[lib]
name = "pi"
path = "src/lib.rs"
[[bin]]
name = "pi"
path = "src/main.rs"
# RETIRABLE binary (pending RULE 1 approval)
# Legacy capture functionality - 91KB, last modified 2026-03-12
# Candidate for removal per binary classification bd-uuwgi.1
[[bin]]
name = "pi_legacy_capture"
path = "src/bin/pi_legacy_capture.rs"
# Examples (moved from src/bin/ to examples/)
# These binaries are accessible via: cargo run --example <name>
[[example]]
name = "basic_sdk"
path = "examples/basic_sdk.rs"
[[example]]
name = "ext_artifact_manifest"
path = "examples/ext_artifact_manifest.rs"
[[example]]
name = "ext_conformance_matrix"
path = "examples/ext_conformance_matrix.rs"
[[example]]
name = "ext_conformance_report"
path = "examples/ext_conformance_report.rs"
[[example]]
name = "ext_full_validation"
path = "examples/ext_full_validation.rs"
[[example]]
name = "ext_inclusion_list"
path = "examples/ext_inclusion_list.rs"
[[example]]
name = "ext_license_screen"
path = "examples/ext_license_screen.rs"
[[example]]
name = "ext_onboarding_queue"
path = "examples/ext_onboarding_queue.rs"
[[example]]
name = "ext_popularity_snapshot"
path = "examples/ext_popularity_snapshot.rs"
[[example]]
name = "ext_release_binary_e2e"
path = "examples/ext_release_binary_e2e.rs"
[[example]]
name = "ext_runtime_risk_ledger"
path = "examples/ext_runtime_risk_ledger.rs"
[[example]]
name = "ext_score_candidates"
path = "examples/ext_score_candidates.rs"
[[example]]
name = "ext_stress"
path = "examples/ext_stress.rs"
[[example]]
name = "ext_tiered_corpus"
path = "examples/ext_tiered_corpus.rs"
[[example]]
name = "ext_unvendored_fetch_run"
path = "examples/ext_unvendored_fetch_run.rs"
[[example]]
name = "ext_validate_dedup"
path = "examples/ext_validate_dedup.rs"
[[example]]
name = "ext_workloads"
path = "examples/ext_workloads.rs"
[[example]]
name = "pi_debug"
path = "examples/pi_debug.rs"
[[example]]
name = "pijs_workload"
path = "examples/pijs_workload.rs"
[[example]]
name = "session_workload_bench"
path = "examples/session_workload_bench.rs"
[[example]]
name = "test_duration"
path = "examples/test_duration.rs"
[[example]]
name = "test_infinite_loop"
path = "examples/test_infinite_loop.rs"
[[example]]
name = "test_time"
path = "examples/test_time.rs"
[dependencies]
# CLI
clap = { version = "4.5.60", features = ["derive", "env", "string"] }
clap_complete = "4.5.66"
# Async runtime
asupersync = { version = "=0.3.1", default-features = false, features = ["tls-native-roots", "test-internals"] }
futures = "0.3"
async-trait = "0.1"
# URL parsing/building
url = "2"
# Signals
ctrlc = "3.5.2"
# Serialization
serde = { version = "1", features = ["derive", "rc"] }
serde_json = { version = "1", features = ["raw_value"] }
json5 = "1.3.1"
# Error handling
anyhow = "1.0.102"
thiserror = "2"
# Terminal output (rich_rust for beautiful TUI)
rich_rust = { version = "0.2.0", features = ["full"] }
crossterm = "0.29"
enable-ansi-support = "0.2"
# Interactive TUI (charmed_rust - bubbletea/lipgloss/bubbles/glamour)
bubbletea = { package = "charmed-bubbletea", version = "0.2.0" }
lipgloss = { package = "charmed-lipgloss", version = "0.2.0" }
bubbles = { package = "charmed-bubbles", version = "0.2.0" }
glamour = { package = "charmed-glamour", version = "0.2.0" }
unicode-width = "0.2"
textwrap = "0.16"
arboard = { version = "3.6.1", optional = true }
# Filesystem
dirs = "6"
tempfile = "3.25.0"
fs4 = "0.13"
glob = "0.3"
ignore = "0.4"
crossbeam-queue = "0.3"
sqlmodel-sqlite = { version = "0.2.2" }
sqlmodel-core = { version = "0.2.2" }
# Time
chrono = { version = "0.4", features = ["serde"] }
# Logging
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
# Utilities
uuid = { version = "1.21.0", features = ["v4"] }
memchr = "2.8.0"
base64 = "0.22"
sha2 = "0.10"
sha1 = "0.10"
md-5 = "0.10"
hmac = "0.12"
pbkdf2 = { version = "0.12.2", features = ["hmac"] }
scrypt = { version = "0.11.0", default-features = false }
getrandom = "0.4.1"
regex = "1.12.3"
semver = "1.0.27"
crc32c = "0.6"
ast-grep-core = "0.40"
ast-grep-language = { version = "0.40", default-features = false, features = [
"tree-sitter-bash",
"tree-sitter-python",
"tree-sitter-javascript",
"tree-sitter-typescript",
"tree-sitter-ruby",
] }
unicode-normalization = "0.1"
xxhash-rust = { version = "0.8", features = ["xxh32"] }
similar = "2"
sysinfo = "0.38.2"
rquickjs = { version = "0.11", features = ["futures", "loader"] }
swc_common = "18.0.1"
swc_ecma_codegen = "23.0.0"
swc_ecma_ast = "20.0.1"
swc_ecma_parser = "34.0.0"
swc_ecma_transforms_base = "37.0.0"
swc_ecma_transforms_typescript = "41.0.0"
swc_ecma_visit = "20.0.0"
wasmtime = { version = "41.0.3", features = ["component-model"], optional = true }
# Image processing (optional)
image = { version = "0.25", optional = true }
[build-dependencies]
vergen-gix = { version = "9.1.0", features = ["build", "cargo", "rustc"] }
[dev-dependencies]
arbitrary = { version = "1", features = ["derive"] }
pretty_assertions = "1"
insta = { version = "1", features = ["filters"] }
tempfile = "3.25.0"
asupersync = { version = "=0.3.1", default-features = false, features = ["test-internals"] }
criterion = { version = "0.8.2", features = ["html_reports"] }
jsonschema = { version = "0.42.0", default-features = false }
proptest = "1.10.0"
wat = "1.245.1"
toml = "1.0.3"
loom = "0.7.2"
[[bench]]
name = "tools"
harness = false
[[bench]]
name = "extensions"
harness = false
[[bench]]
name = "system"
harness = false
[[bench]]
name = "tui_perf"
harness = false
# Gap H: jemalloc for 10-20% allocation-heavy path improvement.
# Keep the global jemalloc override to targets where tikv-jemallocator is a
# supported allocator choice. BSD-family targets stay on the platform allocator.
[target.'cfg(any(target_os = "linux", target_os = "macos"))'.dependencies]
tikv-jemallocator = { version = "0.6", optional = true }
# FreeBSD: third-party libs live under /usr/local and rquickjs-sys doesn't
# ship pre-generated bindings for this target, so regenerate at build time
# via the `bindgen` feature (uses /usr/bin/clang from the base system).
[target.'cfg(target_os = "freebsd")'.dependencies]
rquickjs = { version = "0.11", features = ["futures", "loader", "bindgen"] }
[features]
default = ["image-resize", "jemalloc", "clipboard", "wasm-host", "sqlite-sessions"]
image-resize = ["image"]
clipboard = ["dep:arboard"]
wasm-host = ["dep:wasmtime"]
sqlite-sessions = []
ext-conformance = []
fuzzing = []
jemalloc = ["dep:tikv-jemallocator"]
[profile.release]
opt-level = 3
lto = true
codegen-units = 1
panic = "abort"
strip = true
[profile.dev]
opt-level = 0
debug = true
# Performance benchmarking profile: opt-level=3, with debug info.
[profile.perf]
inherits = "release"
opt-level = 3
lto = "thin"
debug = 1
strip = false
[lints.rust]
unsafe_code = "forbid"
[lints.clippy]
pedantic = { level = "warn", priority = -1 }
nursery = { level = "warn", priority = -1 }
# Allow some common patterns
missing_errors_doc = "allow"
missing_panics_doc = "allow"
module_name_repetitions = "allow"
# ---------------------------------------------------------------------------
# Local development with sibling crates
# ---------------------------------------------------------------------------
# This project depends on published crates.io versions of asupersync,
# rich_rust, charmed-*, and sqlmodel-*. CI builds verify this (no sibling
# repos are checked out).
#
# To develop against LOCAL checkouts of these crates, uncomment the
# [patch.crates-io] section below. Cargo will use the local paths when they
# satisfy the version requirement and fall back to crates.io otherwise.
#
# IMPORTANT: Do NOT commit this section. To prevent accidental commits:
# git update-index --skip-worktree Cargo.toml
# To re-enable tracking:
# git update-index --no-skip-worktree Cargo.toml
#
# [patch.crates-io]
# asupersync = { path = "../asupersync" }
# rich_rust = { path = "../rich_rust" }
# charmed-bubbletea = { path = "../charmed_rust/crates/bubbletea" }
# charmed-bubbletea-macros = { path = "../charmed_rust/crates/bubbletea-macros" }
# charmed-lipgloss = { path = "../charmed_rust/crates/lipgloss" }
# charmed-bubbles = { path = "../charmed_rust/crates/bubbles" }
# charmed-glamour = { path = "../charmed_rust/crates/glamour" }
# charmed-harmonica = { path = "../charmed_rust/crates/harmonica" }
# sqlmodel-core = { path = "../sqlmodel_rust/crates/sqlmodel-core" }
# sqlmodel-sqlite = { path = "../sqlmodel_rust/crates/sqlmodel-sqlite" }