Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
233 lines (229 loc) · 12.6 KB
/
Copy pathCargo.toml
File metadata and controls
233 lines (229 loc) · 12.6 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
[package]
name = "io-cli"
version = "0.41.0"
edition = "2021"
# io-harness declares 1.95, set by `libsqlite3-sys` calling the std `cfg_select!`
# macro from its build script. Nothing here can be lower than what the harness
# needs, so the floor is copied rather than guessed at.
rust-version = "1.95"
authors = ["Aakash Pawar"]
license = "Apache-2.0"
description = "A terminal agent that shows you what it is allowed to do, what it is spending, and what it refused — while it works."
repository = "https://github.com/initorigin/io-cli"
readme = "README.md"
# This crate is never published. The name holds seventeen yanked versions from an
# archived product, a yank does not free a version number, and the distribution
# decision is prebuilt binaries on the GitHub Release. `publish = false` makes an
# accidental `cargo publish` impossible rather than merely discouraged.
publish = false
# The binary is `io`. The crate is `io-cli` because the bare names are taken on
# crates.io by other people; the two never have to agree.
[[bin]]
name = "io"
path = "src/main.rs"
# The library half exists so the integration tests under `tests/` can reach the
# renderer, the composer and the picker. A binary-only crate cannot be linked by
# an integration test, and F4, F5, F8 and N3 are all integration tests.
[lib]
name = "io_cli"
path = "src/lib.rs"
[dependencies]
# The agent loop, the providers, the tools, the sandbox, the policy engine and the
# session store — all of it. This crate adds none of them; see the F7 test.
#
# `media` is on from 0.9.0. It is what makes `Media`, `Session::attach` and
# `TaskContract::images` exist at all — and it also puts io-harness's own
# `view_image` into `workspace_tools()`, so the agent gains a tool as a
# consequence of enabling it. That is a capability change arriving inside an
# interface release and it is stated in the README and the CHANGELOG rather than
# left to be discovered. It is governed by the same policy as any other read.
# `documents` is on from 0.20.0, and it is the umbrella io-harness already
# declares — `["xlsx", "docx", "pptx", "pdf", "barcode"]`, exactly the five
# formats this release names. One word rather than five, because the harness
# had already grouped them and a list written out here would be a second copy
# to keep true.
#
# **It costs 159 transitive crates and it moves `image` down a patch, and both
# are consequences rather than choices.** `barcode` is `rxing`, and every
# published `rxing 0.9.x` pins `image = "=0.25.8"` exactly. This crate asks for
# `^0.25` and the lockfile stood at 0.25.10, which cargo cannot reconcile — so
# the lock is pinned to 0.25.8, which both requirements accept. A `cargo update`
# that lifts `image` again will fail to resolve until `rxing` relaxes; that is
# the whole of the constraint and it is written here rather than discovered in
# a red CI run.
#
# **The `default-features = false` on `image` below no longer wins, and saying
# so is the point.** `rxing` and `docx-rs` both take `image` with its defaults,
# and cargo unifies features across a graph — so `avif` (`ravif`, an AV1
# encoder), `exr`, `qoi`, `dds` and `rayon` are compiled into this tree from
# 0.20.0 despite the argument made below for excluding them. That argument is
# still correct about what this *renderer* can be handed; it is simply no longer
# load-bearing on the build. Turning `barcode` back off is what would restore
# it, and `documents` would then have to be spelled out as its other four.
# **`otel`, `mcp-server` and `codeact` are on from 0.39.0, and every one of them
# is claimed by io-harness to add no crate.** `otel = []` writes OTLP over the
# `reqwest` and `serde_json` already in the default build; `mcp-server =
# ["tokio/io-std"]` is two more types inside a name already here, the JSON-RPC
# framing hand-written precisely to avoid the nine packages `rmcp`'s server half
# pulls in; and `codeact = []` turns nothing on at all, because its interpreter
# is a host binary discovered the way a browser is and never downloaded.
#
# **That claim is checked at its source, and the sentence that stood here said
# something else (0.40.0).** It said the claim was verified against `cargo tree
# --depth 1` by `tests/dependencies.rs` — which parses this file and `Cargo.lock`
# and never runs cargo, and `--depth 1` prints io-cli's own DIRECT dependencies,
# which is exactly where a transitive crate would not appear. What is asserted is
# what can be: `f8_the_pinned_harness_features_this_crate_turns_on_name_no_dependency`
# reads the `[features]` table of the io-harness version `Cargo.lock` pins and
# holds those three to naming no `dep:`. The ten-name allowlist is a separate gate
# in the same file, asserted in both directions.
io-harness = { version = "0.86", features = [
"media",
"browser",
"documents",
"otel",
"mcp-server",
"codeact",
] }
# **`tui-textarea` is gone as of 0.18.0, and it is why this pair was frozen.**
# The comment that stood here said ratatui stayed at 0.29 and crossterm at 0.28
# because the composer was built out of that widget and the 0.30 line carried
# forks of it rather than a release. That was true and it had a cost: the widget
# has published nothing since 2024-10-22, it required `ratatui ^0.29.0` through
# every feature path it had including `no-backend`, and 0.29 in turn required
# `lru ^0.12.0` — a crate carrying an advisory whose fix landed in 0.16.3 and was
# never backported. So the pin could not be bumped around; the dependency had to
# go. io-cli owns its editing model now (`src/editor.rs`), and `lru` is out of the
# tree entirely.
#
# `default-features = false` with `crossterm_0_29` rather than the bare default
# `crossterm`, and the two crates move together or not at all. ratatui chooses the
# crossterm it re-exports by feature, so the direct `crossterm` line below and this
# flag name the same version by construction; the release that let them disagree
# would build two crossterm versions whose key events are different types. 0.18.0
# held this at 0.28 and said so here and in `.github/dependabot.yml`; 0.22.0 is the
# deliberate change both notes were waiting for. Of the remaining defaults,
# `all-widgets` is only the calendar and `macros` is only the declarative builders
# — this crate uses neither, and the base widgets are not behind either flag.
#
# `unstable-rendered-line-info` is enabled for one method: `Paragraph::line_count`,
# which answers how many rows a wrapped paragraph will occupy. `insert_before`
# takes that height as an argument, and a caller that estimates it truncates
# exactly the content this product exists to keep. It is a feature of a dependency
# already taken, not a dependency.
ratatui = { version = "0.30", default-features = false, features = [
"crossterm_0_29",
"layout-cache",
"underline-color",
"unstable-rendered-line-info",
] }
crossterm = "0.29"
clap = { version = "4", features = ["derive"] }
# `io-util` and `io-std` are 0.36.0's, for the ACP adapter: it reads
# newline-delimited JSON-RPC frames off stdin and writes them to stdout, and
# `AsyncBufReadExt::read_line` over `tokio::io::stdin()` is what does it. They are
# features of a name already here rather than a name of their own, which is the
# whole reason `src/acp.rs` speaks the wire itself instead of taking the official
# `agent-client-protocol` crate — that one is correct and well made, and its
# dependency graph brings a second async executor family beside this one:
# `async-io`, `async-process`, `async-task`, `blocking` and `polling`, with its
# stdio transport putting `blocking::Unblock` over the real stdin and stdout.
# (The crate count that walk produced is not repeated here: it came from
# crates.io metadata rather than a resolve, and a number this file cannot check
# is the kind of claim that goes stale unread. The five names are the argument.)
# Two owners of stdin is not a hypothetical failure here; see `src/stdin.rs`,
# which exists because of what it cost in 0.13.1.
tokio = { version = "1", features = [
"rt-multi-thread",
"macros",
"sync",
"time",
"io-util",
"io-std",
] }
serde = { version = "1", features = ["derive"] }
# The tenth name, and the first added since 0.3.0. `io exec --json` writes each
# `io_harness::RunEvent` as one line of JSON, and the event type derives
# `Serialize` in io-harness itself — which already depends on serde_json
# unconditionally, so nothing new enters the tree and no artifact grows. What is
# bought is not a capability but a correctness property: writing JSON by hand
# would put string escaping for tool output and model replies in this crate.
# Argued in 0.5.0's release record, as `tests/dependencies.rs` requires.
serde_json = "1"
toml = "1"
# Syntax highlighting inside a diff, and the feature set is the load-bearing part
# rather than the version.
#
# `default-features = false` excludes `regex-onig`, which is oniguruma — a C
# library. Two of this product's four artifacts are cross-compiled, to
# `x86_64-unknown-linux-musl` and `x86_64-pc-windows-msvc`, and a native build
# step in that path fails inside the release workflow rather than in a test.
# `regex-fancy` is the pure-Rust engine that replaces it.
#
# `default-themes` is off on purpose: the colours come from io-cli's own token
# set, so a highlighted diff and the rest of the interface are one aesthetic
# instead of two, and `NO_COLOR` keeps working because there is only one place
# that decides colour. `html`, `plist-load` and `yaml-load` are for loading
# grammars and emitting markup at runtime, which this product never does.
#
# `tests/dependencies.rs` asserts this exact feature list. A later
# `default-features = true` would pull the C engine back in silently.
syntect = { version = "5", default-features = false, features = [
"default-syntaxes",
"regex-fancy",
] }
# The eleventh name, and the first added since 0.5.0. Decoding an image into
# pixels, so a picture can be drawn as half-block cells on a terminal that speaks
# no graphics protocol — the form that has to work everywhere, and the only part
# of 0.9.0 that needs a decoder at all.
#
# `default-features = false` again, and for the same class of reason syntect's is:
# the defaults are `rayon` plus `default-formats`, and `default-formats` pulls
# `avif`, which is `ravif` — an AV1 *encoder* — along with `exr`, `hdr`, `dds`,
# `qoi` and `ff`. None of that decodes anything this crate can be handed.
#
# The list is exactly the formats io-harness will accept from a file, which is the
# set this renderer can ever see: the four that go on a wire unchanged
# (`png`, `jpeg`, `gif`, `webp`) and the five it transcodes to PNG on the way in
# (`bmp`, `tiff`, `ico`, `tga`, `pnm`). io-harness itself declares seven of the
# nine; `gif` and `webp` are added here because the harness never decodes those —
# it passes them through — while a half-block cell needs their pixels. SVG, HEIC
# and AVIF are refused by `Media::attach` by name before this crate sees a byte.
#
# `tests/dependencies.rs` asserts this exact list, as it has asserted syntect's
# since 0.3.0. Nothing here encodes: the base64 a graphics protocol needs is
# already on `Media`, so no base64 crate enters this tree.
image = { version = "0.25", default-features = false, features = [
"png",
"jpeg",
"gif",
"webp",
"bmp",
"tiff",
"ico",
"tga",
"pnm",
] }
[dev-dependencies]
tempfile = "3"
# **The second dev-dependency this crate has ever had, and it exists so that four
# keystroke contracts have an instrument at all.** The three ways 0.38.2 could
# lose an operator's work by a keystroke were all found at a real terminal and
# none of them was visible to the 2,000-odd offline tests: `src/main.rs` is what
# decides them and nothing under `tests/` links it, and the recorder backend
# every other test uses is not a tty. `openpty` is thirty lines over a name that
# is already in the transitive tree; `portable-pty` was the alternative and it
# brings a dozen packages on Windows into a repository whose dependency argument
# is that the set is small and enumerated. Unix only — the pty arms are compiled
# out on Windows and `tests/pty.rs` says so out loud rather than reporting a skip
# that reads like a pass.
#
# **It is declared here and not under `[target.'cfg(unix)'.dev-dependencies]`,
# deliberately.** That is where it belongs by platform and it is exactly where
# `tests/dependencies.rs` refuses to let it go: a target-gated dev-dependency is
# a test-only crate arriving where N1's count cannot see it, and the gate has
# said so since before this crate had a second one. The cost of declaring it
# unconditionally is that Windows compiles a crate it never links; the benefit is
# that `cargo tree --depth 1` prints the honest set. The platform gate lives on
# the code instead, as `#[cfg(unix)]` in `tests/pty.rs`.
libc = "0.2"