Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
290 lines (271 loc) · 15.4 KB
/
Copy pathCargo.toml
File metadata and controls
290 lines (271 loc) · 15.4 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
[workspace]
members = [".", "crates/sandbox", "crates/desktop"]
# Standalone workspace root. The crate previously inherited version/edition from
# a parent workspace that does not exist, so cargo failed while parsing the
# manifest, before it could even look at the source.
[package]
name = "incord-code"
description = "Autonomous coding harness: plans work, delegates it to an installed agent on your own subscription, and proves it was done"
# The release tag without its `v`: release.yml refuses a tag that disagrees,
# because `incode update` compares this against the latest release's tag.
version = "0.1.0"
edition = "2021"
license = "Apache-2.0"
# The oldest toolchain this actually builds on, MEASURED rather than guessed:
# each package in Cargo.lock is resolved to its own manifest in the registry
# cache and read for `rust-version` there (the lock file itself records no such
# field). Declared here so cargo REFUSES an older toolchain with a message
# naming the version, instead of failing somewhere inside a dependency where the
# cause is unrecognisable.
#
# RE-MEASURED 2026-09-16, after xcap + image were added: 356 packages, 283 with
# a manifest in the local cache, of which 213 declare a floor and 70 declare
# none. The highest is `image 0.25.10` at exactly 1.88 — so the number below is
# unchanged, but it is now pinned by a DIFFERENT package than before
# (previously `home 0.5.12`, also 1.88).
#
# THE OTHER 73 COULD NOT BE READ, and that is a real limit on the measurement
# rather than an oversight: they are the macOS and Linux capture stacks xcap
# pulls in (wayland-*, xcb, zbus and friends). Cargo resolves them into the lock
# but never downloads source for a target it is not building, so their floors
# are unknown here. They cannot affect a Windows build. RE-MEASURE ON LINUX AND
# macOS before claiming this floor for those platforms.
#
# Two traps, both hit while measuring, both worth the reader's time:
# - A loop that silently skips a missing manifest UNDERCOUNTS (154 read as
# 152, 2026-09-01). Count the misses explicitly and make them add up.
# - `version = 4` on line 3 of Cargo.lock is the LOCKFILE FORMAT version, not
# a package's. Pairing name/version lines across the whole file shifts every
# pair by one and reports all 356 packages missing. Parse inside
# [[package]] blocks only.
rust-version = "1.88"
[[bin]]
name = "incode"
path = "src/main.rs"
# Runs the insbx engine for real: its binary is insbx's helper, so it has its own
# `main` (see the file).
[[test]]
name = "insbx_engine"
harness = false
[dependencies]
serde = { version = "1", features = ["derive"] }
serde_json = "1"
tokio = { version = "1", features = ["full"] }
anyhow = "1"
tracing = "0.1"
reqwest = { version = "0.12", features = ["json", "stream"] }
# The local run server (`incode serve`). NO NEW CRATE: both are already in
# Cargo.lock as reqwest's own dependencies, at these exact versions — declaring
# them turns on the server half of code the binary already links. Hand-rolling
# HTTP over a TcpListener would have added no dependency at all and a request
# parser, which is a security surface even on a loopback socket.
hyper = { version = "1", features = ["server", "http1"] }
hyper-util = { version = "0.1", features = ["tokio"] }
http-body-util = "0.1"
chrono = "0.4"
uuid = { version = "1", features = ["v4"] }
regex = "1"
# Image attachments travel to the provider base64-encoded. Already resolved to
# 0.22.1 as a transitive dependency, so declaring it pins nothing new.
base64 = "0.22"
# The Agent Client Protocol's wire TYPES, for `incode --acp` (src/acp_agent),
# where incode itself is the agent an editor drives. Types only: the transport
# is ours (newline-delimited JSON-RPC over stdin/stdout, on threads). The full
# `agent-client-protocol` crate is NOT used — it brings a second async runtime
# beside tokio.
#
# A NEW PACKAGE, pinned exactly: Apache-2.0, `rust-version` 1.88 (matches ours).
# `default-features = false` drops `schemars`, which only generates JSON Schema.
# No `unstable_*` feature is enabled; nothing here needs one.
#
# NOTE: it turns on serde_json's `preserve_order` for the whole crate (feature
# unification), so a `serde_json::Map` keeps insertion order instead of sorting.
agent-client-protocol-schema = { version = "=1.9.1", default-features = false }
# The standalone sandbox in this workspace (`crates/sandbox`), as the `insbx`
# engine for shell commands: `sandbox_engine: "insbx"`. A path dependency, so
# no new package; it adds the seccomp filter, the host-allowlist proxy and the
# `.git` protection the built-in engine lacks.
incord-sandbox = { path = "crates/sandbox" }
# Computer use (`crates/desktop`, binary `incu`): the 23-tool MCP server that
# `incode --desktop-mcp` wraps, and the journal/stop-file/capture code the run
# server and the toolbox call. A path dependency, so no new package: it carries
# the screen-capture, accessibility and input dependencies that used to be
# declared here. `default-features = false` so the `desktop-capture` feature
# below decides whether capture is built, as it always did.
incord-desktop = { path = "crates/desktop", default-features = false }
# PNG and JPEG for the toolbox's own picture handling (`toolbox::image`); the
# same pin and the same two codecs as `incord-desktop`, so it is one package.
# `default-features = false` because the default is FIFTEEN codecs (avif, exr,
# webp, tiff, dds, ...) and pictures need png + jpeg only.
image = { version = "0.25.10", default-features = false, features = ["png", "jpeg"] }
# CLI-specific
rustyline = { version = "15", features = ["derive"] }
crossterm = "0.28"
similar = "2"
pulldown-cmark = "0.12"
# ---------------------------------------------------------------------------
# The toolbox's search, outline, document and validation engines (phase 6a).
# NEW PACKAGES, vetted in scratch crates and approved by the owner; each pinned
# exactly. See docs/ARCHITECTURE.md "Dependencies" for why each one.
# ---------------------------------------------------------------------------
# Search: ripgrep's own walker and searcher, for Grep, Glob and LS.
# The directory walker that honours .gitignore, .ignore and .git/info/exclude.
ignore = "=0.4.33"
# Line-oriented search with context lines, binary detection and BOM transcoding.
grep-searcher = "=0.1.17"
# The regex matcher grep-searcher drives.
grep-regex = "=0.1.14"
# The model's own glob, applied AFTER the walk so it only narrows what the
# ignore rules allowed (an override or type filter would re-admit hidden files).
globset = "=0.4.20"
# Outline: symbols from a syntax tree.
# The parser runtime and its query engine.
tree-sitter = "=0.26.13"
# Held at 0.1.7: 0.1.8 declares rust-version 1.90, above this crate's floor.
tree-sitter-language = "=0.1.7"
# One grammar per language, each behind its own `lang-*` feature below.
tree-sitter-rust = { version = "=0.24.2", optional = true }
tree-sitter-typescript = { version = "=0.23.2", optional = true }
tree-sitter-python = { version = "=0.25.0", optional = true }
tree-sitter-go = { version = "=0.25.0", optional = true }
tree-sitter-javascript = { version = "=0.25.0", optional = true }
# Documents: Read returns markdown for these.
# PDF text. It can panic on a malformed file, so every call is caught.
pdf-extract = "=0.12.1"
# Spreadsheets: xlsx, xls, ods. 0.38.0 (MIT, MSRV 1.88): the first calamine
# on zip 9, so the spreadsheet reader leaves the zip 8 the advisories below
# name; 0.36.1 required zip ^8.6.
calamine = { version = "=0.38.0", default-features = false }
# The archive under docx, pptx, odt (and the bomb check before calamine), and
# the tool archives ext_tools unpacks. 9.5.1 (MIT, MSRV 1.88, the latest
# stable): zip 8.6.0 had GitHub advisories for a parser differential between
# its two headers (critical), extract() writing outside the target through a
# symlink (high), unbounded symlink targets and Shrink/Reduce/Implode sizes
# (high, denial of service) and an AES HMAC check skipped at early EOF; all
# fixed by 9.0.5.
zip = { version = "=9.5.1", default-features = false, features = ["deflate"] }
# The XML inside those archives. 0.41 is already in the lock; not bumped.
quick-xml = { version = "=0.41.0", default-features = false }
# Readability for an HTML article, as markdown.
dom_smoothie = { version = "=0.18.2", default-features = false }
# Whole-page HTML to markdown, for a page that is not an article.
dom_query = { version = "=0.28.0", default-features = false, features = ["markdown"] }
# Validation: each tool call's input against its own schema, before it runs.
# Default features off: they pull a network resolver and a TLS stack, and a
# `$ref` must never make this process fetch anything.
jsonschema = { version = "=0.58.0", default-features = false }
# The headless browser's DevTools socket, for the Screenshot tool and the
# image-only PDF fallback (phase 6b). A NEW PACKAGE, vetted in a scratch copy of
# this manifest: 0.30.0 is the latest, MIT OR Apache-2.0, rust-version 1.85.
# The client half only, over a plain loopback TcpStream: `handshake` without
# any TLS feature. It adds 7 packages to the lock (itself, sha1 0.11 and its
# digest 0.11 / block-buffer 0.12 / crypto-common 0.2 / hybrid-array / const-oid,
# each MIT OR Apache-2.0, rust-version 1.85); bytes, http, httparse, rand,
# data-encoding, log and thiserror were already there.
tungstenite = { version = "=0.30.0", default-features = false, features = ["handshake"] }
# External tools (`admin.json` `tools`, `src/ext_tools`): a release asset is
# checked against its sha256 and unpacked. sha2 0.10.9 and flate2 1.1.10 are
# ALREADY in Cargo.lock (sha2 under several crates, flate2 under zip's
# `deflate`), so declaring them adds no package. tar is a NEW PACKAGE: 0.4.46 is
# the latest, MIT OR Apache-2.0, rust-version 1.63; `default-features = false`
# drops `xattr`, so it brings only filetime beside it (see ARCHITECTURE.md,
# "External tools").
sha2 = "=0.10.9"
# The managed settings file (`/etc/incode/managed.toml`, src/permissions/
# managed.rs). NO NEW PACKAGE: toml 1.x is already resolved in Cargo.lock for
# the workspace's own `crates/sandbox`, which declares it the same way.
toml = "1"
flate2 = "=1.1.10"
tar = { version = "=0.4.46", default-features = false }
# Computer use is its own crate now: `crates/desktop` (`incord-desktop`, binary
# `incu`), declared above. The dependencies only it uses (image, enigo, xcap,
# clipboard-win, uiautomation, x11rb, zbus and the Win32 display bindings) moved
# with it, with the notes on why each is pinned as it is. `image` is declared in
# both: incode decodes and re-encodes pictures too (`toolbox::image`).
[target.'cfg(windows)'.dependencies]
windows-sys = { version = "0.61", features = [
"Win32_Foundation",
# WindowsAndMessaging: mcp_oauth::open_browser's SW_SHOWNORMAL.
"Win32_UI_WindowsAndMessaging",
# agent::process_tree — a job object, so stopping an agent stops everything
# it started, and the tree dies with incode. SECURITY_ATTRIBUTES and
# IO_COUNTERS appear in the job object signatures, hence the other two.
"Win32_System_JobObjects",
"Win32_Security",
"Win32_System_Threading",
# acp_agent::stdio — `incode --acp` takes the real stdin/stdout for the
# protocol and points the process-wide standard handles at stderr and NUL,
# so nothing else (a stray print, an inherited child) can reach the
# protocol channel. GetStdHandle / SetStdHandle live here.
"Win32_System_Console",
# sandbox::windows — a write-restricted token for the read-only shell
# sandbox. CreateRestrictedToken, TokenLogonSid, TokenDefaultDacl and
# WRITE_RESTRICTED are in Win32_Security; ConvertStringSidToSidW and
# ConvertStringSecurityDescriptorToSecurityDescriptorW (for the restricting
# SIDs and the token's default DACL) are in Win32_Security_Authorization;
# CreateProcessAsUserW / OpenProcessToken / ResumeThread are in
# Win32_System_Threading (already on). Each was confirmed present in the
# cached 0.61.2 manifest before being written here.
"Win32_Security_Authorization",
# permissions::managed — the ProgramData folder from the OS
# (SHGetKnownFolderPath, FOLDERID_ProgramData), never from `%ProgramData%`,
# which the person the managed file constrains can point anywhere.
# mcp_oauth::open_browser — ShellExecuteW, so a login URL is never parsed
# by cmd. CoTaskMemFree and CoInitializeEx are in Win32_System_Com. NO NEW
# PACKAGE: features of windows-sys 0.61.2 only, each item confirmed in the
# cached source before being written here.
"Win32_UI_Shell",
"Win32_System_Com",
] }
# agent::process_tree on Linux and macOS: `killpg` for the process group the
# agent is started in. NO NEW PACKAGE — libc is already resolved in Cargo.lock
# (0.2.189) as a dependency of tokio and others.
[target.'cfg(unix)'.dependencies]
libc = "0.2"
# The Linux OS sandbox for a model's shell commands (`src/sandbox`): Landlock,
# the kernel's own unprivileged filesystem confinement, applied by the
# `--sandbox-exec` helper before it execs the command. A NEW PACKAGE, vetted in
# a scratch copy of this manifest on 2026-09-25:
# - 0.4.7 is the latest (published 2026-07-27, not yanked); covers ABI V1–V9.
# - MIT OR Apache-2.0; rust-version 1.71, below this crate's 1.88 floor.
# - Adds EXACTLY ONE package to the lock — landlock itself. Its dependencies
# (enumflags2 0.7, libc 0.2, thiserror 2.0) are all already resolved.
# - `cargo check --target x86_64-unknown-linux-musl` passes with no cross C
# compiler, and a static musl probe enforced the rules live in WSL2.
# Pinned exactly, like every other toolbox dependency.
[target.'cfg(target_os = "linux")'.dependencies]
landlock = "=0.4.7"
# ---------------------------------------------------------------------------
# Features
#
# The harness builds and tests standalone — no external Incord crates required.
# Execution is delegated to installed agent CLIs, and memory/audit coordination
# is handled with the Incord Memory service over HTTP.
# ---------------------------------------------------------------------------
[features]
# Every Outline grammar is on by default; each can be dropped to shrink the
# binary, and Outline then says that language was not built in.
default = ["desktop-capture", "lang-rust", "lang-ts", "lang-python", "lang-go", "lang-js"]
# Screenshots and the display list for computer use, on every OS: forwarded to
# `incord-desktop` (`crates/desktop/src/capture.rs`). Without it every capture
# is refused by name. On Windows and macOS it builds xcap; on Linux it needs no
# extra crate (the X server is read with x11rb).
desktop-capture = ["incord-desktop/desktop-capture"]
lang-rust = ["dep:tree-sitter-rust"]
lang-ts = ["dep:tree-sitter-typescript"]
lang-python = ["dep:tree-sitter-python"]
lang-go = ["dep:tree-sitter-go"]
lang-js = ["dep:tree-sitter-javascript"]
[dev-dependencies]
tempfile = "3"
# Lets a test build a `reqwest::Response` directly. reqwest re-exports only
# `header`/`Method`/`StatusCode`/`Version`, not `Response`, and its public
# `From<http::Response<T>>` impl needs the type. Already resolved to 1.5.0 as a
# transitive dependency of reqwest, so this pins nothing new and is test-only.
http = "1"
# The TLS server and the private certificate authority that prove a CA from
# `INCODE_CA_CERTS` is trusted (`runtime::http`). Generated at test time: no key
# is committed. Test-only; rustls and ring are already in Cargo.lock (as
# optional parts of reqwest's tree), rcgen is from the same project.
rcgen = "0.13"
rustls = { version = "0.23", default-features = false, features = ["ring", "std", "tls12"] }