chutes-build 0.4.3 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,550 @@ project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.0.1] - 2026-08-11
10
+
11
+ ### Fixed (the TUI wore upstream's identity)
12
+
13
+ - **The splash showed Grok's wordmark.** `assets/logo/logo07.txt` and
14
+ `logo05.txt` were byte-identical to upstream's: the re-base overwrote the Chutes
15
+ wordmark and 1.0.0 shipped it, so every start drew the wrong brand. Restored. A
16
+ sweep of every asset in the tree says these two were the only ones taken.
17
+ - **A Chutes user was offered a subscription to another company's product.**
18
+ Hitting a usage limit produced "Upgrade to SuperGrok" and "Upgrade to SuperGrok
19
+ Heavy"; a restricted command said it "requires SuperGrok". The buttons already
20
+ pointed at chutes.ai/pricing — the fork had rebranded where they *go* and left
21
+ what they *say*. This one predates the re-base; v0.4.3 carries the same strings.
22
+ - The screen-mode settings described opening "plain grok", the welcome gate read
23
+ "SuperGrok subscription required", and the feedback prompt opened with "You've
24
+ been using Grok Code productively!".
25
+
26
+ Rust identifiers, crate names, telemetry event types and model ids such as
27
+ `grok-4.5` are deliberately untouched: `AGENTS.md` keeps them so upstream diffs
28
+ stay readable, and a model name is data rather than branding.
29
+
30
+ The wordmark's hash is now pinned by a test, so a merge that takes upstream's
31
+ side there fails instead of shipping. The loss was silent by nature: nothing
32
+ compiles differently, no test read the bytes, and the only symptom was on screen.
33
+
34
+ ### Security
35
+
36
+ - **The `agent serve` token comparison no longer rests on a function that
37
+ disclaims the property it was chosen for.** It used
38
+ `ring::constant_time::verify_slices_are_equal`, which ring now deprecates as an
39
+ "internal function not intended for external use with no promises regarding side
40
+ channels" — while the reason for calling it at all is that `==` on `&str` returns
41
+ at the first differing byte, and over a socket with no rate limit that leaks the
42
+ token one byte at a time. It now uses `subtle::ConstantTimeEq`, which is
43
+ maintained for this and also resists the compiler folding the comparison back
44
+ into an early return. No new code enters the build: `subtle` was already in the
45
+ graph through rustls, so the lock file moves by one line.
46
+
47
+ ### Fixed
48
+
49
+ - **`--help` had upstream's branding back in it.** The re-base took upstream's
50
+ wording over the fork's in five places a user reads, three of them flag *names*:
51
+ `--grok-ws-origin` and `--grok-ws-url`, which 0.4.3 spelled `--chutes-ws-*` and
52
+ kept hidden, so the re-base both renamed them and put internal plumbing into the
53
+ top-level help; `--xai-api-base-url`, described as "the public xAI API base URL"
54
+ when it overrides the Chutes inference base URL; the positional-prompt example,
55
+ which read ``grok "fix the bug"`` beside a `chutes-build` example on the same
56
+ line; and the `screen_mode` help, which said "To default plain `grok` to
57
+ minimal". Found by installing the published 1.0.0 the way a user gets it and
58
+ reading every help surface — the step the release procedure asks for and which
59
+ had not been done. `leader/mod.rs` passes those flags to the child process, so
60
+ the rename covers it too.
61
+
62
+ ### Repository and CI
63
+
64
+ - **`xai-grok-shell --lib auth::` runs on Windows.** It failed 24 there, and the
65
+ CI step had never executed at all, because the pager step above it always failed
66
+ first. A provider command goes through `cmd /C` off Unix — deliberately, for
67
+ exit-code propagation — while the fixtures were POSIX one-liners. They now drive
68
+ `auth-provider-fixture`, a real helper invoked with `args`, so no shell
69
+ interprets them. Two lock tests read the lock file through a second handle while
70
+ holding it, which Windows refuses; they read through the holding handle now, as
71
+ the product does.
72
+ - **The Linux job reaches its end.** It had not passed in the last twenty runs, so
73
+ four steps below the failure — auth and session integration, agent construction
74
+ and bundled skills, Chutes-native tools, and clippy — had not run either. Behind
75
+ them were a banned `tokio::process::Command::spawn` in a test the ban does not
76
+ describe, and a doc comment separated from the function it documents.
77
+ - **That job's 60-minute limit was sized for the broken state.** The first run to
78
+ reach the end spent 59.7 minutes on work that passed and was killed during the
79
+ cache *save* — which left the next run cold, slower, and killed in the same
80
+ place. Raised to 90, matching Windows. Measured twice since at 65 and 67 minutes:
81
+ the cost is roughly 45 minutes of tests plus 11 of clippy, not compilation, so a
82
+ warm cache moves it very little and the headroom is about a quarter.
83
+ - **All five CI jobs pass.** Windows had been red since 1.0.0 landed and Linux had
84
+ not finished in over twenty runs; this is the first complete green run.
85
+ - `RUSTSEC-2026-0249` is recorded in `deny.toml`: `smartstring` is unmaintained —
86
+ archived, not vulnerable — and reaches this tree only as a non-optional
87
+ dependency of `rhai`, whose latest stable we already use, so no bump closes it.
88
+ It turned the dependency job red on a documentation-only commit, an hour after
89
+ the same check passed, because that job reads the live advisory database.
90
+ - A flaky history-delivery test asked for a repaint and a result in one condition;
91
+ it fails when the daemon is *fast* enough to answer before the eager snapshot,
92
+ which is why widening its deadline had not helped.
93
+
94
+ ## [1.0.0] - 2026-08-07
95
+
96
+ Chutes Build is re-based onto `xai-org/grok-build` 1.0.0 (`afbc0fb`) and adopts
97
+ its version, so the number now says which upstream this build actually is.
98
+
99
+ ### Why the re-base
100
+
101
+ `.github/upstream.json` recorded `lastReviewedVersion: 0.2.117`, but those
102
+ commits had been *reviewed and not taken* — the records said "nothing safe to
103
+ port in isolation". For the retained crates the tree was still at the 2026-07-17
104
+ fork point, 2075 files and roughly 440k lines behind upstream. Cherry-picking
105
+ could not close that: upstream added 94k lines in five days. Measuring the fork
106
+ showed why re-basing was the cheaper path — only 102 files existed here and not
107
+ upstream, and only 26 actually consume `chutes-build-core`.
108
+
109
+ ### Added
110
+
111
+ Everything upstream shipped between the fork point and 1.0.0 arrives at once:
112
+ 1348 files of work from the never-taken window, plus the roughly 110 changes
113
+ between 0.2.117 and 1.0.0. Highlights users will notice: session recaps that
114
+ follow the language of the conversation, narrow markdown tables that reflow
115
+ inside their cells with hard splits on grapheme boundaries, a plan-viewer
116
+ scrollbar that is easier to grab, `--output-format streaming-messages-json`,
117
+ tabbed usage and session-info, and a large batch of terminal, tmux and session
118
+ fixes.
119
+
120
+ ### Security
121
+
122
+ Carried forward and, where upstream had since fixed them differently, taken from
123
+ upstream instead:
124
+
125
+ - Permission rules for Read, Edit and Grep lexically normalize the tool's path
126
+ before the glob match, so `Read(src/**)` can no longer be escaped with
127
+ `src/../../etc/passwd`.
128
+ - `NotebookEdit` / `NotebookRead` no longer alias onto `Edit` / `Read`.
129
+ - A client-forwarded MCP server matching an on-disk Claude or Cursor config is
130
+ rejected while that vendor's `mcps` switch is off.
131
+ - Diagnostic logging of a credential fragment no longer panics on a non-ASCII
132
+ token.
133
+ - Chutes API keys (`cpk_`) are recognised by the secret redactor.
134
+ - Memory passes through the secret filter at every write path, and every write
135
+ path now creates its file owner-only. Three of the four created files with the
136
+ process umask, so a fresh install's `MEMORY.md` and both bootstrap templates
137
+ were world-readable — and memory holds whatever you asked the agent to
138
+ remember.
139
+ - `model-router` dispatch validates `CHUTES_ROUTER_BASE_URL` through the
140
+ endpoint policy before a session credential is sent to it.
141
+ - The default inference endpoint is `llm.chutes.ai` again. The re-base had left
142
+ upstream's `api.x.ai/v1`, so any model entry without an explicit base URL
143
+ would have sent a Chutes API key to xAI.
144
+ - The relay and gateway WebSocket endpoints are loopback sentinels again, not
145
+ `code.grok.com` and `grok.com`. Chutes Build has no vendor relay; those paths
146
+ must fail closed.
147
+ - The changelog fetch, the update check and the remote-session/workspace clients
148
+ point at a closed loopback port, so none of them can phone home.
149
+ - The npm scaffold that would install `@xai-official/grok-<platform>` binaries on
150
+ postinstall is gone, along with the version check that compared this build
151
+ against upstream's package.
152
+
153
+ ### Fixed
154
+
155
+ - Cloudflare edge failures (520–524, 529, 530) are retried instead of ending the
156
+ turn, while origin-TLS 525/526 stay fatal.
157
+ - A server `Retry-After` is clamped to 30s and jittered.
158
+ - Failed requests no longer dump a Cloudflare HTML error page into the terminal.
159
+ - The sandbox starts on large workspaces (deny-glob entry budget 200k → 2M).
160
+ - `bin/protoc` is a DotSlash wrapper Windows cannot execute from a build script;
161
+ a vendored platform binary is now the fallback.
162
+
163
+ ### Fixed (the Chutes tool layer was unreachable)
164
+
165
+ - **`generate_media`, `list_media_models`, `describe_media_model`, `browser`,
166
+ `ocr_page` and `get_chutes_usage` were in no toolset.** The re-base kept every
167
+ implementation and dropped every registration, so six thousand lines of working
168
+ code compiled, passed their own tests, and could not be called. Upstream's
169
+ toolsets carried its Imagine tools instead, which talk to an endpoint Chutes has
170
+ no equivalent for.
171
+ - **`/imagine` and `/imagine-video` had disappeared**, for the same reason: the
172
+ pager hides a command whose required tools are not advertised, and they required
173
+ the xAI Imagine tools. Both now use `generate_media`, and their instructions
174
+ teach the Chutes workflow — list the catalog, describe the model, compose the
175
+ payload from the cord's own example — because no two Chutes media models share a
176
+ schema. `/imagine-video` is rewritten rather than renamed: upstream's guidance
177
+ opens with "there is no text-to-video tool", which is true of that API and false
178
+ here.
179
+ - **Plugin sources in the system temp directory were auto-trusted on Windows.**
180
+ Auto-trust covers anything under the user's home, and on Windows temp *is* under
181
+ the home — so a plugin unpacked there skipped the explicit trust step entirely.
182
+ Found by a test that had been failing on Windows since before the re-base.
183
+ - Five upstream test failures on Windows are gone; `xai-grok-agent` now passes all
184
+ 578. Two were real defects rather than test bugs: the trust hole above, and a
185
+ home-directory guard no test on Windows could reach.
186
+
187
+ ### Fixed (Windows, and these were the product)
188
+
189
+ The pager's Windows suite had sixty-six failures. Most were fixtures written for
190
+ POSIX, but five were defects users would meet:
191
+
192
+ - **`doctor fix` could not apply anything.** The managed-config writer opened the
193
+ parent directory as a file, to `sync_all` it after the rename. That sync is
194
+ Unix-only — Windows has no durability barrier for a directory — so off Unix the
195
+ handle was captured and never read, and Windows cannot produce one at all:
196
+ `File::open` on a directory needs `FILE_FLAG_BACKUP_SEMANTICS`, which `std` does
197
+ not set. Every fix planned, then failed to write, reporting "access denied"
198
+ against the directory rather than the file.
199
+ - **No file path written in agent prose was clickable.** The scanner that turns
200
+ paths into `file://` overlays matched `~?/…` only, so `C:\Users\me\x.md` was
201
+ never recognised. Only tool headers worked, because those receive the path
202
+ directly instead of finding it in text.
203
+ - **Tab completion in the extensions modal destroyed the path.** It rebuilt the
204
+ directory prefix by looking for a `/`; a Windows path has none, so completing
205
+ `C:\src\plugin-s` replaced the whole field with `plugin-source`. The directory
206
+ listing, gated on the text ending in `/`, never triggered either.
207
+ - **The memory-search header showed `\MEMORY.md`.** The path shortener looked for
208
+ `/` alone, so the separator after the memory root survived — and a nested result
209
+ was not shortened at all, painting the whole `\xai-…\sessions\…` tail.
210
+ - **A test fixture named `nul` proved nothing**, because on Windows that name is
211
+ the null device wherever it appears: the write went nowhere and the NUL-byte
212
+ refusal it existed to check was never reached.
213
+
214
+ ### Fixed (releases carried an unstripped binary)
215
+
216
+ `release-dist` keeps symbols on purpose, for sidecars extracted "before stripping
217
+ post-build" — and that post-build strip had never been written. The npm packages
218
+ therefore shipped the profile's full DWARF: `linux-arm64-gnu` reached 938 MB
219
+ unpacked and the registry refused it outright with `413 Payload Too Large`.
220
+ Stripping now happens between the build and the smoke test, so the run check, the
221
+ package, its checksum and the release asset all see the binary that ships. Linux
222
+ falls from ~890 MB to ~130 MB; Windows needs none, since MSVC keeps debug info in
223
+ a separate `.pdb`.
224
+
225
+ The macOS packages for this version were published before that fix and are larger
226
+ than the rest; they cannot be replaced, because an npm version is immutable.
227
+
228
+ ### Authentication
229
+
230
+ Upstream ships an OAuth application everyone signs in through, so its
231
+ documentation and defaults put browser login first and treat the API key as a
232
+ fallback. Chutes does not work that way: OAuth needs an application you register in
233
+ your own account area at [chutes.ai/app/api](https://chutes.ai/app/api), so there is
234
+ no client ID that could serve anyone but its owner.
235
+
236
+ - **The compiled-in OAuth client ID is gone.** It offered a sign-in that would fail
237
+ for every user but one. `OAuth2ProviderConfig::from_env` now returns `None` unless
238
+ `CHUTES_BUILD_OAUTH2_CLIENT_ID` names an app, which is also upstream's shape and
239
+ so one seam fewer at the next merge. With no app configured, `login` already said
240
+ the right thing — "Sign-in is not available for this deployment. Set
241
+ CHUTES_API_KEY instead." — and now that message is reachable.
242
+ - **A cached session survives a shell with no OAuth app configured.** The
243
+ compatibility check compares a credential's issuer against the configured one;
244
+ with no provider configured there is nothing to compare against, and the question
245
+ becomes which credentials are self-sufficient. A session is: `oidc::refresh`
246
+ renews it from the issuer and client id stored in the credential itself, not from
247
+ the config. So exporting `CHUTES_BUILD_OAUTH2_CLIENT_ID`, signing in, and then
248
+ launching from a desktop shortcut or a cron entry that lacks the variable keeps
249
+ working — discarding the session there would strand the user in the one state
250
+ where interactive login is unavailable. The legacy issuer-less `WebLogin`
251
+ credential is still rejected, now for either config shape, because it has neither
252
+ issuer nor client id to renew with.
253
+ - **The documentation was rewritten around the API key**, which is the primary and
254
+ always-valid credential rather than a fallback: the authentication chapter, the
255
+ first-launch section of the getting-started guide, `docs/getting-started.md` and
256
+ the README. `docs/getting-started.md` had also described a "bundled client ID"
257
+ that no longer exists.
258
+ - **`jsonwebtoken` had no provider to sign or verify with.** It picks one from cargo
259
+ features, and this graph enables both: the shell declares `rust_crypto`, while
260
+ `xai-file-utils` -> `gcloud-storage` -> `gcloud-auth` enables `jwt-aws-lc-rs`. Cargo
261
+ unifies features across the graph, so neither can be turned off from here, and with
262
+ both on the crate refuses to choose — every signature operation panics. Production
263
+ survived on placement alone: `run_login_flow_with_config` installed a provider and
264
+ is the only entry to the one function that verifies an id_token, which holds exactly
265
+ until a second verification path appears. The install now sits at each point of use,
266
+ behind a `OnceLock`, so the library is correct by construction; 23 auth tests that
267
+ had been failing on Linux CI depend on it too.
268
+ - **Six example keys read `CHUTES_API_KEY="xai-..."`** — upstream's prefix, left
269
+ behind when the rebrand renamed the variable but not its value. A Chutes key is
270
+ `cpk_`-prefixed, which the redactor already knew and the docs did not.
271
+
272
+ The API key also has to be *enterable*, and on this branch it was not:
273
+
274
+ - **`/apikey` did not exist.** `slash/commands/apikey.rs` came across in the
275
+ re-base and was never declared in `slash/commands/mod.rs`, so it was not
276
+ compiled — the same registration gap as the Chutes tool layer, in a third
277
+ registry, and invisible for the same reason: an unreferenced module is not
278
+ built, so nothing warns. Everything it needs went with it —
279
+ `Action::EnterApiKey`/`SubmitApiKey`, `Effect::SubmitApiKey`,
280
+ `AuthMode::ApiKeyEntry`, the dispatchers, the welcome-screen arm, the `k` key.
281
+ The shell half was intact the whole time: `chutes.build/setApiKey` is handled in
282
+ `extensions/auth.rs` and allow-listed in `acp_agent.rs`. Nothing could reach it.
283
+ - **`/login` jumped straight into OAuth** instead of asking, because
284
+ `Action::ShowLoginMenu` went the same way. It now opens the choice menu
285
+ ("Login with …" / "Enter API key" / "Quit") that the fork's `/login` always did.
286
+ - Together these meant a fresh install advertised exactly one login method —
287
+ browser sign-in — which without a registered app cannot run. The only way in was
288
+ to set the environment variable before starting the program.
289
+ - Four registries now, and the fourth caught itself: the pager's
290
+ `pager_builtin_triggers_are_reserved_in_shell` failed the moment `/apikey`
291
+ became real, because `apikey` was not in the shell's `PAGER_COMMAND_KEYS` and a
292
+ skill of that name could have shadowed it. Reserved. The new
293
+ `apikey_registered_in_builtin_commands` is the test that would have caught the
294
+ original gap.
295
+
296
+ The documentation had described `/apikey` and the in-app entry all along, in
297
+ `docs/slash-commands.md` and `docs/getting-started.md`. Third time in this release
298
+ that auditing the docs against the code found the code wrong.
299
+
300
+ ### Fixed (voice had no working transport)
301
+
302
+ - **Speech-to-text could not work at all.** The re-base took upstream's 1.0.0 voice
303
+ crate, which is streaming-only — it opens a WebSocket to `{api_base}/v1/stt` — and
304
+ the rebrand pointed that at `api.chutes.ai`, where the route does not exist. Chutes
305
+ serves Whisper-family models as ordinary chutes over request/response HTTP, which
306
+ is exactly why the fork wrote a batch transport and made it the default. The two
307
+ files implementing it, `pcm.rs` and `stt/batch.rs`, came across in Fase 1 and were
308
+ never declared in any module, so neither was compiled; `SttMode`, `batch_api_base`
309
+ and the pipeline's batch branch were not copied at all. What shipped was a feature
310
+ whose only transport was a route the backend does not serve.
311
+ - Restored as a graft onto upstream's newer pipeline rather than a copy over it:
312
+ the subprocess capture that replaced the in-process one no longer exposes
313
+ `peak_meter()`, so the silence guard takes its running peak from the chunks with
314
+ `pcm::peak_abs_i16_le` — which is what that module is for, and the batch path holds
315
+ every sample anyway.
316
+ - `[voice].api_base` goes back to a closed loopback address. Streaming has no Chutes
317
+ backend, so the default must fail immediately rather than resolve to a real host
318
+ that cannot answer.
319
+ - Batch STT now posts through `xai_grok_http::shared_client()` instead of building a
320
+ bare `reqwest::Client`. The fork's version skipped `CHUTES_EXTRA_CA_BUNDLE` — a
321
+ proxy-terminated corporate network is precisely where that request would otherwise
322
+ fail — and the connection health-checks.
323
+ - The STT transport is documented in `docs/configuration.md`, which had listed the
324
+ media variables and said nothing about how speech is transcribed. The 0.4.x
325
+ changelog had mentioned `stt_mode = "streaming"` all along.
326
+ - `xai-grok-http/src/extra_ca.rs` deleted: upstream 1.0.0 ships `xai-grok-extra-ca`,
327
+ reading the same `CHUTES_EXTRA_CA_BUNDLE` with a size cap and rustls validation the
328
+ fork's copy lacked, and `xai-grok-http` already calls it. The old module was dead
329
+ code that a reader would have taken for the live one.
330
+
331
+ A sweep for the same failure mode — a source file that no `mod` declaration
332
+ reaches, and so is never compiled — found four in total across the tree, honouring
333
+ `#[path]` and `include!` to avoid false positives. All four are addressed in this
334
+ release; the sweep now returns nothing.
335
+
336
+ ### Added (the Advisor is back)
337
+
338
+ The fourth undeclared file was `/advisor`, and unlike the others its backend had
339
+ not come across either — so this is a feature port rather than a registration,
340
+ though a small one, because the `[subagents.roles]` model-pin mechanism it hangs
341
+ off is upstream's and was already here.
342
+
343
+ - **The `advisor` built-in subagent**, invoked like any other through `task` with
344
+ `subagent_type: "advisor"`: an on-demand senior reviewer for architecture,
345
+ correctness, security and trade-offs. Read-only by construction — repository
346
+ inspection, Context7, memory and web fetch, with no shell, no edit and no nested
347
+ agents — so it can review a claim without being able to act on it. Defaults to
348
+ maximum reasoning effort, because it is called sparingly for plans, blockers and
349
+ completion claims, where review quality matters more than latency.
350
+ - **`/advisor`** turns it on or off and pins the model it uses, writing
351
+ `[subagents.toggle].advisor` and `[subagents.roles.advisor].model`. An empty pin
352
+ clears it and the advisor inherits the session's model. `true` is removed rather
353
+ than written, so an untouched config file stays untouched.
354
+ - `advisor` is reserved in the shell's `PAGER_COMMAND_KEYS` — the check that caught
355
+ the same omission for `/apikey`.
356
+
357
+ ### Security (`agent serve` authentication)
358
+
359
+ Two CodeQL alerts pointed at `print_serve_startup_info` writing a secret to stderr.
360
+ Following them found the token itself was the problem, and the printing was the
361
+ least of it:
362
+
363
+ ```rust
364
+ let raw = uuid::Uuid::new_v4().to_string().replace('-', "");
365
+ raw.chars().cycle().take(len).collect() // len = 12
366
+ ```
367
+
368
+ - **The token was 48 bits.** Twelve characters of a v4 UUID's hex, for a credential
369
+ that authorises a server which runs shell commands and edits files, on a `/ws`
370
+ endpoint with no rate limit. Now 32 bytes from the OS CSPRNG, base64url without
371
+ padding. The `cycle()` also meant any length above 32 repeated the same UUID while
372
+ looking like it added entropy.
373
+ - **The comparison was not constant-time.** `token == expected_secret` on `&str`
374
+ returns at the first differing byte, so an unauthenticated caller could recover the
375
+ token one byte at a time — roughly 12 x 16 attempts instead of 2^48. Now
376
+ `ring::constant_time::verify_slices_are_equal`, with the length compared separately
377
+ because it is not secret. `ring` moves from dev-dependency to dependency, which
378
+ costs nothing: it was already in this crate's normal build graph via aws-config.
379
+ - **The token is printed only when stderr is a terminal.** An operator reading their
380
+ own console still gets it; a redirected stderr — a systemd journal, a CI log,
381
+ `2>serve.log` — no longer persists a live credential to disk. That was CodeQL's
382
+ actual finding.
383
+ - **A non-loopback `--bind` now warns.** The transport is `ws://` and the token
384
+ travels as a query parameter, so binding to a routable address puts both on the
385
+ wire in cleartext. Previously silent.
386
+
387
+ Eight tests, including that a correct prefix does not authenticate and that an empty
388
+ presented token is rejected.
389
+
390
+ The other 308 open alerts were triaged by reading each flagged line on `main`: 263
391
+ are test fixtures, and the rest are `session_id` values (a UUID naming a local file,
392
+ not a credential), closed-loopback sentinels for the features policy disables, or
393
+ URLs whose `https` scheme `endpoint_policy::validate_endpoint_url` enforces where
394
+ CodeQL cannot see it through a `format!`. One more real finding needs no fix here:
395
+ `bin/trace_classify.rs` logged an API key, and this release deletes that binary.
396
+
397
+ Those 308 are now dismissed on GitHub, each with the reasoning for its group rather
398
+ than a blanket note; the 3 real ones stay open so the next scan closes them as fixed,
399
+ which is a truer record. The two Dependabot `lru` alerts are dismissed as `not_used`:
400
+ the advisory is an `IterMut` Stacked Borrows violation, and neither crate holding an
401
+ `LruCache` ever iterates it — `ratatui 0.29` memoizes layouts through `get`/`put`,
402
+ `aws-sdk-s3` has no `iter_mut()` at all. Bumping `aws-sdk-s3` to the release that
403
+ does require the patched `lru` was tried and reverted: it drags the aws-smithy stack
404
+ forward, wants rustc 1.94.1 against this repo's 1.94.0 pin, and still leaves
405
+ `ratatui 0.29` as a source. `docs/code-review-2026-08-01.md` CR-003 records the
406
+ evidence and what closing it would actually cost.
407
+
408
+ ### Repository and CI
409
+
410
+ Landing the re-base exposed two checks that had never run against this tree, both
411
+ broken by the re-base itself rather than by anything in it:
412
+
413
+ - **The secrets scan pinned its allowlist to commit SHAs.** `.gitleaksignore` listed
414
+ twelve reviewed fixtures as `<sha>:<path>:<rule>:<line>`; the re-base moved every
415
+ one into a new commit and all twelve went stale together. Since this project tracks
416
+ upstream by re-basing, that mechanism was guaranteed to break at every sync. Six
417
+ fixtures are now allowlisted **by value** in `.gitleaks.toml`, which survives a
418
+ rewrite, and six that exist only in old commits — from before upstream annotated
419
+ the lines — keep SHA pins, in published history that will not move. Verified three
420
+ ways: clean tree, clean 159-commit history, and a probe proving a realistic `ghp_`
421
+ token and a real ES256 JWT sharing the fixtures' own header are still reported.
422
+ - **`cargo deny` had been skipped every run**, because gitleaks failed before it in
423
+ the same job. It reported an undeclared git source — `our-forks/async-openai`,
424
+ upstream's fork and the client the sampler uses for Chutes' OpenAI-compatible API —
425
+ and five advisories, none with a patched release. Each is now ignored with a
426
+ reachability check that was run rather than assumed: no `{:p}` anywhere for the
427
+ crossbeam-epoch formatting bug, zero `git2::Remote::list` call sites, and a logging
428
+ stack that does not depend on `rand` for the re-entrancy advisory.
429
+
430
+ - `git2` 0.20.4 for the `Buf` dereference advisory, carrying libgit2 1.9.1 -> 1.9.6.
431
+ Its two other advisories have no fixed release yet.
432
+ - Releases now carry the six platform executables. All three existing releases have
433
+ notes and **zero assets**, while the README said "take a binary from Releases" —
434
+ so anyone not using npm had nowhere to download this program from. The workflow
435
+ attaches them from the run that built them, and refuses to publish if one is
436
+ missing.
437
+ - A social-preview card, three README badges, and the release notes taken from this
438
+ file rather than written twice.
439
+
440
+ ### Documentation
441
+
442
+ The documentation was audited against the code rather than proofread, which is a
443
+ different exercise and found things a read-through would not:
444
+
445
+ - **The README presented the project as SpaceXAI's, under SpaceXAI's logo.** This
446
+ is a fork; upstream wrote most of the code and is credited for it, but not with
447
+ authorship of this tree, and their mark is theirs. `CONTRIBUTING.md` likewise
448
+ described upstream's "no external patches" policy as if it were ours.
449
+ - **`SECURITY.md` sent vulnerability reports to xAI's HackerOne programme** — to
450
+ people who do not maintain this code and cannot fix it, disclosing our issue to
451
+ a third party on the way.
452
+ - **Every install instruction was a 404.** `chutes.ai/cli/install.sh`,
453
+ `install.ps1`, `chutes.ai/cli`, `chutes.ai/build/changelog`,
454
+ `console.chutes.ai`, and the `docs.chutes.ai/build/overview` that `/docs` itself
455
+ opened. Each replacement was checked with a request.
456
+ - **Config examples named `grok-4.5`**, which this build cannot serve, and
457
+ `chutes-build update` was documented as the way to upgrade when it installs
458
+ nothing.
459
+ - **The ACP extension methods were documented under `x.ai/`** while the handlers
460
+ answer on `chutes.build/` — the page integrators read to know what to call.
461
+ - **Version pinning, the telemetry knobs and the coding-data row were documented
462
+ as working controls.** All four version keys parse and nothing acts on them; the
463
+ telemetry switches are compiled out; the privacy row is locked. Each now says so.
464
+ - **Two guide chapters existed on disk and shipped nowhere.** `USER_GUIDE` lists
465
+ what `/docs` shows and what is extracted to `$CHUTES_BUILD_HOME/docs`, and the
466
+ fork's Chutes-ecosystem and browser chapters were not in it — the same
467
+ registration gap as the tool layer, in a different registry. Renumbered to 25 and
468
+ 26 and registered.
469
+ - Memory's owner-only file permissions and the absence of any coding-data
470
+ retention control are now stated in `PRIVACY.md`, where a reader looks for them.
471
+
472
+ One code defect came out of the audit, in the direction that matters — the docs
473
+ were right and the code was not:
474
+
475
+ - **A custom model-catalog endpoint received the ambient `CHUTES_API_KEY`.**
476
+ `PRIVACY.md` promises it never does and documents `CHUTES_MODELS_API_KEY` for
477
+ that case; the re-base dropped the separate auth arm, so pointing
478
+ `CHUTES_BUILD_MODELS_LIST_URL` at any host sent it your Chutes credential during
479
+ startup. Restored, with the test asserting the separation.
480
+
481
+ ### Changed
482
+
483
+ - The upstream sync procedure changes from "port selectively, never merge" to a
484
+ merge of `upstream/main` with conflicts expected in the Chutes seams. See
485
+ `docs/upstream-sync.md`.
486
+ - `project_picker` and the bundled `SKILL.md` files follow upstream and are
487
+ removed.
488
+ - The coding-data retention row in settings is locked with a reason instead of
489
+ offered: this build has no such control, and the extension behind the row
490
+ already refused the call. The data-sharing banner never renders for the same
491
+ reason.
492
+ - Rate-limit and tier-restriction messages no longer pitch an upstream
493
+ subscription. The 429 message named SuperGrok and linked to it; the media
494
+ tools told the model to sell it.
495
+ - `scripts/seam_sweep.py` (new) compares the values the previous release shipped
496
+ against a re-based tree. It exists because a constant whose value came from
497
+ upstream compiles fine and its tests assert against the constant, which is how
498
+ the endpoint and credential defaults above survived a green gate.
499
+
500
+ ### Fixed (identity)
501
+
502
+ Behavioural verification of the built binary, which the gate cannot do, found
503
+ the product still calling itself Chutes Build in the places users actually look:
504
+
505
+ - `--version` printed `grok 1.0.0`; `Usage:` printed `grok`, because `parse_cli`
506
+ filters `argv[0]` against a launcher allowlist that did not include our own
507
+ binary name.
508
+ - 983 occurrences of the bare product word in CLI help and error text had no
509
+ rebrand rule at all, and 14 stderr diagnostics were prefixed `grok:` — the
510
+ name of a program that does not exist.
511
+ - `models` offered `grok-4.5`: the model catalog had come across from upstream.
512
+ - The built-in agent profiles parsed as `grok-build-plan` while every caller
513
+ asked for `chutes-build-plan`, so `--agent chutes-build-plan` resolved to
514
+ nothing and plan mode fell back to the default profile.
515
+ - The session update and close notifications kept upstream's `_x.ai` extension
516
+ namespace in the replay filter, the session store and the pager's method table,
517
+ while the handlers answered on ours. (Written without the trailing slash on
518
+ purpose: the rebrand rule that fixes those names would otherwise rewrite this
519
+ sentence describing them, as it did once already.)
520
+
521
+ Then a real Chutes API key went in, and found what no static check had:
522
+
523
+ - **The ambient API key was read from `XAI_API_KEY`**, while every error message,
524
+ every doc page and the fork itself said `CHUTES_API_KEY`. Anyone following the
525
+ instructions was never authenticated. The auth-method id users write as
526
+ `preferred_method` in `config.toml` was upstream's too. 304 occurrences across
527
+ 69 files.
528
+ - **570 places told the user to run `grok login`, `grok doctor`, `grok wrap …`**
529
+ in help text, error messages and the bundled user guide. An instruction naming
530
+ a binary that does not exist is worse than no instruction.
531
+ - **`update --check` reached `storage.googleapis.com`** for a channel pointer in a
532
+ bucket that does not exist — a third update endpoint, hidden from the seam
533
+ sweep because rustfmt had wrapped its value onto the next line. Deadened at
534
+ loopback like the other two.
535
+
536
+ - **The notification-hook tests were writing the whole process environment,
537
+ API key included, into files in the crate root.** They interpolated an
538
+ unquoted Windows path into `sh -c`, so the redirect missed the temp directory.
539
+ Thirty such files had accumulated and been committed to the re-base branch;
540
+ history was purged, `.gitignore` now blocks the pattern, and the keys were
541
+ rotated. The branch had never been pushed.
542
+ - **A blank `CHUTES_API_KEY` counted as set**, so a CI job exporting a secret
543
+ that does not exist was told it was using an API key and then failed to
544
+ authenticate. Blank is unset now, as it already was for per-model `env_key`.
545
+
546
+ With those fixed, a live run authenticates, lists the 15 Chutes models from
547
+ `llm.chutes.ai`, and completes a turn through the Auto router in about 13
548
+ seconds, talking only to `api.chutes.ai`, `llm.chutes.ai` and the configured
549
+ router — never to `x.ai` or `grok.com`, and writing nothing outside
550
+ `$CHUTES_BUILD_HOME`.
551
+
552
+
9
553
  ## [0.4.3] - 2026-08-03
10
554
 
11
555
  ### Added
@@ -126,7 +670,7 @@ project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
126
670
 
127
671
  ### Changed
128
672
 
129
- - Reviewed Grok Build upstream through `0.2.117` and recorded the selective
673
+ - Reviewed Chutes Build upstream through `0.2.117` and recorded the selective
130
674
  port and deferral decisions.
131
675
  - Removed the orphaned Dependabot auto-merge workflow after automated version
132
676
  update PRs were disabled.
package/PRIVACY.md CHANGED
@@ -11,13 +11,23 @@ where supported, sessions, logs, local exports, and user memory under
11
11
  `~/.chutes-build` (or `CHUTES_BUILD_HOME`). Plugins, user roles/personas, and
12
12
  managed bundled-agent definitions use that same root; setting
13
13
  `CHUTES_BUILD_HOME` does not fall back to those resources in the default home.
14
- Project memory is maintained in `memories.md`. Known secret formats are filtered
15
- before memory writes, but users should still avoid entering secrets into
16
- prompts.
14
+ Project and global memory are maintained in `MEMORY.md` under that root, with
15
+ per-session logs beside them. Known secret formats are filtered before every
16
+ memory write, but users should still avoid entering secrets into prompts. Memory
17
+ files are created owner-only (mode 0600 where the platform has POSIX
18
+ permissions), including the bootstrap templates written on first run.
17
19
 
18
20
  `chutes-build trace` always creates a local archive. Remote session sharing and
19
21
  search, remote workspace exposure, upstream managed configuration commands, and
20
- automatic update checks are disabled. Session storage is forced to local mode
22
+ automatic update checks are disabled — compiled out through
23
+ `chutes-build-core::product`, with their endpoints pointed at a closed loopback
24
+ port rather than left resolvable.
25
+
26
+ There is no coding-data retention opt-in. Upstream offers one, both as a settings
27
+ row and as a startup banner; here the setting is locked with the reason shown
28
+ inline and the banner never appears, because the control would have nothing to
29
+ enable. Nothing in this build sends your prompts, code, or traces to us or to
30
+ anyone else for retention or training. Session storage is forced to local mode
21
31
  even if inherited write-back settings are present. Updates are installed
22
32
  manually.
23
33
 
package/README.md CHANGED
@@ -1,206 +1,167 @@
1
- # Chutes Build
1
+ <div align="center">
2
2
 
3
- **A privacy-first, open-source coding agent built for the
4
- [Chutes](https://chutes.ai) ecosystem.**
3
+ <h1>Chutes Build (<code>chutes-build</code>)</h1>
5
4
 
6
- [![CI](https://github.com/TheStreamCode/chutes-build/actions/workflows/ci.yml/badge.svg)](https://github.com/TheStreamCode/chutes-build/actions/workflows/ci.yml)
7
- [![npm version](https://img.shields.io/npm/v/chutes-build.svg)](https://www.npmjs.com/package/chutes-build)
8
- [![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)
5
+ [![CI](https://github.com/TheStreamCode/chutes-build/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/TheStreamCode/chutes-build/actions/workflows/ci.yml)
6
+ [![npm](https://img.shields.io/npm/v/chutes-build?logo=npm&color=cb3837)](https://www.npmjs.com/package/chutes-build)
7
+ [![License](https://img.shields.io/badge/license-Apache--2.0-blue)](LICENSE)
9
8
 
10
- Chutes Build combines a polished terminal interface, a production-grade agent
11
- runtime, Chutes-native model routing, subagents, local memory, multimodal tools,
12
- web research, and browser automation. Telemetry, remote trace upload, upstream
13
- session sharing, and phone-home updates are disabled by product policy.
9
+ **Chutes Build** is a terminal-based AI coding agent for the
10
+ [Chutes](https://chutes.ai) ecosystem. It runs as a full-screen TUI that
11
+ understands your codebase, edits files, executes shell commands, searches the web,
12
+ and manages long-running tasks — interactively, headlessly for scripting/CI, or
13
+ embedded in editors via the Agent Client Protocol (ACP).
14
14
 
15
- ![Chutes Build terminal interface](assets/chutes/screenshot/chutes-build.png)
15
+ [Installing](#installing) ·
16
+ [Building from source](#building-from-source) ·
17
+ [Documentation](#documentation) ·
18
+ [Repository layout](#repository-layout) ·
19
+ [Development](#development) ·
20
+ [Contributing](#contributing) ·
21
+ [License](#license)
16
22
 
17
- > **Development preview:** Chutes Build is under active development. Review
18
- > commands and file changes before approving them, especially in unfamiliar
19
- > repositories.
23
+ ![Chutes Build TUI](assets/chutes/screenshot/chutes-build.png)
20
24
 
21
- ## Why Chutes Build
25
+ </div>
22
26
 
23
- | Principle | What it means |
24
- | --- | --- |
25
- | **Chutes-native** | Live model discovery, `Auto (Chutes Router)`, model-aware reasoning controls, account usage, OCR, voice, and media generation are integrated directly into the Rust runtime. |
26
- | **Private by default** | Sessions, memory, traces, logs, configuration, and exports stay local. Cloud features run only when their documented provider call is needed. |
27
- | **Built for real repositories** | Planning, permission controls, worktrees, MCP, skills, background tasks, advisor review, and parallel subagents share one coherent session model. |
28
- | **Transparent fork** | Chutes-specific product code is separated from retained `grok-build` infrastructure, with documented upstream review and Apache-2.0 attribution. |
27
+ ## What this is, and what it is built on
29
28
 
30
- ## Quick start
29
+ Chutes Build is a fork of [`xai-org/grok-build`](https://github.com/xai-org/grok-build)
30
+ — SpaceXAI's Grok Build — re-based onto upstream 1.0.0 and adapted to run on
31
+ Chutes. Upstream wrote most of the code in this tree and it is used here under
32
+ Apache-2.0; the project is not affiliated with or endorsed by SpaceXAI.
31
33
 
32
- ### Install
34
+ What the fork changes:
33
35
 
34
- The npm package selects the native binary for Windows, macOS, or Linux. A Rust
35
- toolchain is not required.
36
+ - **Chutes, not xAI.** Inference goes to `llm.chutes.ai`, the model catalog is
37
+ Chutes', `model-router` ("Chutes Auto") is the default route, and media
38
+ generation, OCR, usage and quota all go through Chutes APIs.
39
+ - **Nothing phones home.** Telemetry, remote error reporting, upload, session
40
+ sharing, remote workspace exposure and self-update are off at compile time and
41
+ their endpoints are deadened, not merely unused. See
42
+ [`PRIVACY.md`](PRIVACY.md).
43
+ - **A few exclusive features**: Chutes media generation and editing, OCR, voice
44
+ input through a Chutes STT endpoint, Context7 documentation lookup, and an
45
+ isolated browser tool.
36
46
 
37
- ```powershell
38
- npm install -g chutes-build
39
- chutes-build
40
- ```
41
-
42
- For one-off use:
43
-
44
- ```powershell
45
- npx chutes-build
46
- ```
47
-
48
- The launcher does not download executables from a lifecycle script.
49
-
50
- ### Authenticate
51
-
52
- An API key is the most reliable way to start. Create one in the Chutes
53
- dashboard, then press `k` on the welcome screen, run `/apikey`, or store it
54
- through the hidden-input CLI flow:
55
-
56
- ```powershell
57
- chutes-build login
58
- chutes-build
59
- ```
60
-
61
- For a process-local credential:
62
-
63
- ```powershell
64
- $env:CHUTES_API_KEY = "your-api-key"
65
- chutes-build
66
- ```
47
+ Everything else is meant to track upstream closely, so their fixes arrive by
48
+ merge rather than by hand. [`docs/upstream-sync.md`](docs/upstream-sync.md)
49
+ documents that procedure and records each sync;
50
+ [`.github/upstream.json`](.github/upstream.json) records the commit this tree is
51
+ level with. `SOURCE_REV` is inherited from upstream's published tree and refers to
52
+ their monorepo, not to anything in this repository.
67
53
 
68
- Browser-based OAuth with PKCE is available through `l` or `/login`. Chutes
69
- OAuth applications may require registered client credentials; see
70
- [Authentication](docs/getting-started.md#authentication) for the supported
71
- fallbacks and environment variables.
54
+ ---
72
55
 
73
- ### Choose a model
56
+ ## Installing
74
57
 
75
- `Auto (Chutes Router)` is the default when no model preference has been saved.
76
- Use `/model` interactively or inspect the live catalog from the CLI:
58
+ Via npm, which fetches the binary for your platform:
77
59
 
78
- ```powershell
79
- chutes-build models
80
- chutes-build models --json
81
- chutes-build --model model-router
60
+ ```sh
61
+ npm i -g chutes-build
62
+ chutes-build --version
82
63
  ```
83
64
 
84
- ## What is included
65
+ Or build from source below.
85
66
 
86
- | Area | Capabilities |
87
- | --- | --- |
88
- | **Agent runtime** | Repository inspection, edits, shell commands, plans, goals, permissions, sandbox profiles, local sessions, worktrees, and structured headless output. |
89
- | **Model routing** | Live Chutes catalog, automatic routing, explicit fallback chains, exact-generation reasoning controls, and vision-capability delegation. |
90
- | **Orchestration** | Read-only advisor, foreground/background subagents, concurrent fan-out, bounded nesting, grouped waits, and isolated worktrees. |
91
- | **Knowledge** | Context7 library documentation, official Chutes source checks, web search, local full-text memory, and Chutes-hosted semantic recall. |
92
- | **Multimodal** | Image and PDF OCR, image/video understanding, voice dictation, and typed image, video, music, and speech generation artifacts. |
93
- | **Automation** | MCP servers, plugins, skills, background tasks, and isolated Chrome/Edge control through local DevTools. |
67
+ From 1.0.0 on, each
68
+ [release](https://github.com/TheStreamCode/chutes-build/releases) also carries the
69
+ six platform executables as downloadable assets. Earlier releases (0.4.x) carry
70
+ release notes only — npm is the way to install those.
94
71
 
95
- Generated media is streamed to bounded temporary storage and persisted with
96
- create-new semantics. Inline previews remain local; unsupported terminals use
97
- safe text cards and native-player fallbacks.
72
+ There is no self-update: `chutes-build` never contacts an update server, and the
73
+ `update` subcommand reports where to get a newer version rather than fetching one.
74
+ [`CHANGELOG.md`](CHANGELOG.md) records what changed in each release.
98
75
 
99
- ## Privacy contract
76
+ ## Building from source
100
77
 
101
- | Boundary | Policy |
102
- | --- | --- |
103
- | **Local state** | Configuration, credentials, sessions, memory, logs, traces, exports, plugins, and agent definitions live under `~/.chutes-build` or `CHUTES_BUILD_HOME`. |
104
- | **Hosted inference** | Prompts and selected context leave the machine only for the Chutes model request that needs them. Semantic memory sends selected memory chunks to the configured Chutes embedding route. |
105
- | **Explicit tools** | OCR, voice, media, web, browser, MCP, and plugin actions send only the inputs required by the selected operation and provider. |
106
- | **Disabled surfaces** | Product telemetry, remote error reporting, automatic trace upload, upstream session sharing/search, remote workspace exposure, and automatic updates cannot be enabled through normal configuration. |
107
- | **Credentials** | Ambient Chutes credentials are restricted to allowlisted official HTTPS hosts. Custom endpoints require dedicated credentials and explicit trust configuration. |
78
+ Requirements:
108
79
 
109
- Read [Privacy](PRIVACY.md) for the complete data-flow inventory and
110
- [Security](SECURITY.md) for the threat boundaries and reporting process.
80
+ - **Rust** — the toolchain is pinned by [`rust-toolchain.toml`](rust-toolchain.toml);
81
+ `rustup` installs it automatically on first build.
82
+ - **[DotSlash](https://dotslash-cli.com)** — required so hermetic tools under
83
+ [`bin/`](bin/) (notably [`bin/protoc`](bin/protoc)) can download and run.
84
+ Install it and ensure `dotslash` is on your `PATH` **before** building:
111
85
 
112
- ## Common workflows
86
+ ```sh
87
+ cargo install dotslash
88
+ # or: prebuilt packages — https://dotslash-cli.com/docs/installation/
89
+ /usr/bin/env dotslash --help # sanity check
90
+ ```
113
91
 
114
- Start an interactive session in the current repository:
92
+ - **protoc** — proto codegen resolves [`bin/protoc`](bin/protoc) via DotSlash,
93
+ or falls back to a `protoc` on `PATH` / `$PROTOC`.
94
+ - Windows, macOS and Linux all build. Windows is where this tree is developed and
95
+ gated, and it needs the vendored `protoc` fallback carried here — upstream 1.0.0
96
+ does not build on Windows at all, because `bin/protoc` is a DotSlash wrapper the
97
+ platform cannot execute from a build script.
115
98
 
116
- ```powershell
117
- chutes-build
99
+ ```sh
100
+ cargo run -p chutes-build # build + launch the TUI
101
+ cargo build -p chutes-build --release # release binary: target/release/chutes-build
102
+ cargo check -p chutes-build # fast validation
118
103
  ```
119
104
 
120
- Run one headless task:
121
-
122
- ```powershell
123
- chutes-build -p "Review this repository and report only actionable findings"
124
- ```
125
-
126
- Create an isolated worktree session:
127
-
128
- ```powershell
129
- chutes-build --worktree feature-auth
130
- ```
131
-
132
- Resume the latest session for the current directory:
133
-
134
- ```powershell
135
- chutes-build --continue
136
- ```
137
-
138
- Use `chutes-build --help` for the installed version's authoritative option
139
- set. See the [CLI reference](docs/cli-reference.md) and
140
- [slash-command reference](docs/slash-commands.md) for the maintained overview.
105
+ The binary artifact is named `xai-grok-pager`; official installs ship it as
106
+ `chutes-build`. On first launch it asks for a Chutes API key — the primary
107
+ credential, created at [chutes.ai/app/api](https://chutes.ai/app/api) and also
108
+ readable from `CHUTES_API_KEY`. Browser login is opt-in and needs an OAuth app you
109
+ register yourself; see the
110
+ [authentication guide](crates/codegen/xai-grok-pager/docs/user-guide/02-authentication.md).
141
111
 
142
112
  ## Documentation
143
113
 
144
- - [Getting started](docs/getting-started.md) — installation, authentication,
145
- first session, models, and troubleshooting.
146
- - [Configuration](docs/configuration.md) — state paths, routing, credentials,
147
- web/browser options, media limits, and development-only endpoint overrides.
148
- - [CLI reference](docs/cli-reference.md) and
149
- [slash commands](docs/slash-commands.md) — public command surfaces.
150
- - [Architecture](docs/ARCHITECTURE.md) — runtime layers and ownership map.
151
- - [npm distribution](npm/README.md) and [release procedure](docs/releasing.md)
152
- — launcher contents, native packages, verification, and publication order.
153
- - [Privacy](PRIVACY.md), [security policy](SECURITY.md), and
154
- [security review](docs/security-review.md) — operational trust boundaries.
155
- - [Documentation index](docs/README.md) — complete user, maintainer, and design
156
- reference map.
157
-
158
- The concise guides available through `/docs` are embedded from
159
- `crates/codegen/xai-grok-pager/docs/user-guide/`.
160
-
161
- ## Build from source
162
-
163
- Prerequisites are Rust stable, Git, and the native C/C++ toolchain required by
164
- Rust on your platform. Protocol Buffer tooling is vendored for normal builds.
165
-
166
- ```powershell
167
- git clone https://github.com/TheStreamCode/chutes-build.git
168
- cd chutes-build
169
- cargo build -p chutes-build --release
114
+ The documentation lives in this repository. There is no separate site: an earlier
115
+ link to `docs.chutes.ai/build/overview` was a 404 dressed as a promise.
116
+
117
+ The user guide ships with the pager crate:
118
+ [`crates/codegen/xai-grok-pager/docs/user-guide/`](crates/codegen/xai-grok-pager/docs/user-guide/)
119
+ — getting started, keyboard shortcuts, slash commands, configuration, theming,
120
+ MCP servers, skills, plugins, hooks, headless mode, sandboxing, and more.
121
+
122
+ ## Repository layout
123
+
124
+ | Path | Contents |
125
+ |------|----------|
126
+ | `crates/codegen/xai-grok-pager-bin` | Composition-root package `chutes-build`; builds the `chutes-build` binary |
127
+ | `crates/codegen/xai-grok-pager` | The TUI: scrollback, prompt, modals, rendering |
128
+ | `crates/codegen/xai-grok-shell` | Agent runtime + leader/stdio/headless entry points |
129
+ | `crates/codegen/xai-grok-tools` | Tool implementations (terminal, file edit, search, ...) |
130
+ | `crates/codegen/xai-grok-workspace` | Host filesystem, VCS, execution, checkpoints |
131
+ | `crates/codegen/...` | The rest of the CLI crate closure (config, MCP, markdown, sandbox, ...) |
132
+ | `crates/common/`, `crates/build/`, `prod/mc/` | Small shared leaf crates pulled in by the closure |
133
+ | `third_party/` | Vendored upstream source (Mermaid diagram stack) — see below |
134
+
135
+ > [!IMPORTANT]
136
+ > The root `Cargo.toml` (workspace members, dependency versions, lints,
137
+ > profiles) is **generated** — treat it as read-only. Prefer editing per-crate
138
+ > `Cargo.toml` files.
139
+
140
+ ## Development
141
+
142
+ ```sh
143
+ cargo check -p <crate> # always target specific crates; full-workspace builds are slow
144
+ cargo test -p xai-grok-config # per-crate tests
145
+ cargo clippy -p <crate> # lint config: clippy.toml at the repo root
146
+ cargo fmt --all # rustfmt.toml at the repo root
170
147
  ```
171
148
 
172
- The executable is `target\release\chutes-build.exe` on Windows and
173
- `target/release/chutes-build` on macOS/Linux.
174
-
175
- ### Repository map
176
-
177
- | Path | Ownership |
178
- | --- | --- |
179
- | `AGENTS.md` | Repository-wide guidance and verification contract for coding agents. |
180
- | `crates/chutes-build-core/` | Chutes routing, endpoint policy, catalog, reasoning, account, media, privacy, and product policy. |
181
- | `crates/codegen/` | Retained and adapted upstream runtime crates. Keep crate names stable to make upstream review practical. |
182
- | `npm/` | Native launcher, platform-package assembly, and npm verification. |
183
- | `docs/` | Public technical references, maintainer procedures, and design records. |
184
- | `.github/workflows/` | CI, security policy checks, upstream monitoring, and release packaging. |
185
- | `prod/` and `third_party/` | Shared protocol sources and retained attribution/material from upstream. |
186
-
187
- The root `Cargo.toml` is generated and treated as read-only. Make dependency
188
- changes in the owning crate manifest or generator source instead of manually
189
- reorganizing the generated workspace.
149
+ ## Contributing
190
150
 
191
- ## Project
151
+ > [!NOTE]
152
+ > External contributions are not accepted. See [`CONTRIBUTING.md`](CONTRIBUTING.md).
192
153
 
193
- Chutes Build is a substantially modified fork of
194
- [`xai-org/grok-build`](https://github.com/xai-org/grok-build). Upstream changes
195
- are reviewed and ported selectively; they are never merged or released
196
- automatically. See [Upstream synchronization](docs/upstream-sync.md).
154
+ ## License
197
155
 
198
- Issues and focused pull requests are welcome. Read
199
- [CONTRIBUTING.md](CONTRIBUTING.md), [AGENTS.md](AGENTS.md),
200
- [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md), and [SECURITY.md](SECURITY.md) before
201
- contributing.
156
+ First-party code in this repository is licensed under the **Apache License,
157
+ Version 2.0** — see [`LICENSE`](LICENSE).
202
158
 
203
- Apache-2.0 licensing and attribution are documented in [LICENSE](LICENSE),
204
- [NOTICE](NOTICE), and [THIRD-PARTY-NOTICES](THIRD-PARTY-NOTICES).
159
+ Third-party and vendored code remains under its original licenses. See:
205
160
 
206
- Copyright 2026 Michael Gasperini (Mikesoft).
161
+ - [`THIRD-PARTY-NOTICES`](THIRD-PARTY-NOTICES) — crates.io / git dependencies,
162
+ bundled UI themes, and **in-tree source ports** (including openai/codex and
163
+ sst/opencode tool implementations)
164
+ - [`crates/codegen/xai-grok-tools/THIRD_PARTY_NOTICES.md`](crates/codegen/xai-grok-tools/THIRD_PARTY_NOTICES.md)
165
+ — crate-local notice for the codex and opencode ports (license texts +
166
+ Apache §4(b) change notice)
167
+ - [`third_party/NOTICE`](third_party/NOTICE) — vendored Mermaid-stack index
package/SECURITY.md CHANGED
@@ -1,73 +1,35 @@
1
1
  # Security Policy
2
2
 
3
- ## Supported versions
3
+ Chutes Build is a fork of
4
+ [`xai-org/grok-build`](https://github.com/xai-org/grok-build). Where to report
5
+ depends on which part is affected, and if you are not sure, report it here first.
4
6
 
5
- Chutes Build is currently a development preview. Security fixes are applied to
6
- the latest revision of the default branch; older source snapshots are not
7
- supported.
7
+ ## Report it here
8
8
 
9
- ## Reporting a vulnerability
9
+ Use GitHub's private vulnerability reporting on this repository:
10
+ <https://github.com/TheStreamCode/chutes-build/security/advisories/new>.
10
11
 
11
- Use the repository's private GitHub Security Advisory reporting flow. Do not
12
- open a public issue and do not include live credentials, private source code,
13
- session archives, or personal data in a report.
12
+ Please do not open a public issue for a vulnerability.
14
13
 
15
- Include:
14
+ Anything in the fork's own surface belongs here:
16
15
 
17
- - the affected revision and platform;
18
- - a concise description of the impact and trust boundary;
19
- - minimal reproduction steps using synthetic data;
20
- - whether exploitation requires user approval, repository control, browser
21
- access, or a malicious model/tool response;
22
- - any proposed mitigation.
16
+ - credential resolution and storage (`CHUTES_API_KEY`, `auth.json`, the OAuth
17
+ flow against the Chutes IdP);
18
+ - which endpoints may receive a credential (`chutes-build-core::endpoint_policy`);
19
+ - the plugin trust boundary, permission rules, and the sandbox;
20
+ - the Chutes tools — media generation, OCR, the isolated browser, Context7;
21
+ - memory storage and the secret filter.
23
22
 
24
- You should receive an acknowledgement when the report is reviewed. Disclosure
25
- and remediation timing will be coordinated according to severity and the
26
- availability of a safe fix.
23
+ ## Report it upstream too
27
24
 
28
- ## Security boundaries
25
+ If the flaw is in code inherited from upstream and reproduces on Grok Build, it
26
+ affects their users as well: please also report it through their process. A fix
27
+ landing upstream reaches more people, and it comes back here by merge.
29
28
 
30
- Chutes Build can execute commands, modify files, invoke models, start subagents,
31
- and control an isolated browser. Model output, repository contents, web pages,
32
- MCP servers, tool responses, and downloaded documents are untrusted input. Keep
33
- permission prompts enabled, use trusted repositories, and never expose secrets
34
- in prompts or committed files.
29
+ ## What this build does not do
35
30
 
36
- The project intentionally disables telemetry, remote trace uploads, automatic
37
- updates, upstream session sharing/search, remote workspace exposure, and
38
- upstream managed configuration. These are compile-time product policies, not
39
- server-controlled feature flags. Any change to those guarantees requires an
40
- explicit security and privacy review.
41
-
42
- Ambient Chutes credentials are restricted to allowlisted official HTTPS hosts.
43
- Custom inference and model-catalog endpoints require dedicated credentials.
44
- OAuth client secrets are read from the environment, used for token exchange
45
- and refresh when configured, and are never persisted by Chutes Build.
46
-
47
- Credential-bearing and download clients reject URL credentials, unexpected
48
- ports, insecure schemes, redirects, and private, loopback, link-local, or
49
- special-use DNS results. Development endpoint overrides require the explicit
50
- `CHUTES_ALLOW_INSECURE_ENDPOINTS=1` opt-in; the opt-in does not make ambient
51
- Chutes credentials transferable to arbitrary model endpoints. Custom Context7
52
- endpoints require their own opt-in and never receive `CONTEXT7_API_KEY`.
53
-
54
- Machine-readable MCP listings redact environment/header values and URL
55
- credentials. Destructive session, memory, plugin, marketplace, and worktree
56
- operations require an interactive confirmation unless an explicit `--yes`
57
- flag is provided. Media responses stream to bounded temporary storage, default
58
- to 128 MiB with a 512 MiB hard ceiling, and use transactional create-new
59
- artifact writes. Automatic permission mode only fast-paths deterministic
60
- read-only shell commands; classifier failure returns to the normal user prompt.
61
-
62
- ## Automated release checks
63
-
64
- CI scans the complete Git history for known secret patterns and evaluates the
65
- resolved Rust dependency graph for advisories, licenses, duplicate versions,
66
- and unapproved sources. Release packaging additionally executes every native
67
- binary, creates SHA-256 sidecars for native npm archives, verifies those
68
- sidecars after artifact download, and runs the assembled launcher with its
69
- native Linux package before publication can begin.
70
-
71
- Documented advisory exceptions must include a bounded rationale in `deny.toml`.
72
- New advisories or source-policy violations fail CI by default. The current
73
- review record is maintained in [docs/security-review.md](docs/security-review.md).
31
+ Some classes of report do not apply, because the behaviour is compiled out rather
32
+ than merely disabled: telemetry, remote error reporting, session sharing, remote
33
+ workspace exposure, trace upload, and self-update. See
34
+ [`PRIVACY.md`](PRIVACY.md) and `chutes-build-core::product`. If you find one of
35
+ them active, that *is* a vulnerability and we want to hear about it.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chutes-build",
3
- "version": "0.4.3",
3
+ "version": "1.0.1",
4
4
  "description": "Privacy-first, open-source coding agent for the Chutes ecosystem",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Michael Gasperini (Mikesoft)",
@@ -37,12 +37,12 @@
37
37
  "check": "npm test && npm run verify:release && npm pack --dry-run"
38
38
  },
39
39
  "optionalDependencies": {
40
- "chutes-build-darwin-arm64": "0.4.3",
41
- "chutes-build-darwin-x64": "0.4.3",
42
- "chutes-build-linux-arm64-gnu": "0.4.3",
43
- "chutes-build-linux-x64-gnu": "0.4.3",
44
- "chutes-build-win32-arm64": "0.4.3",
45
- "chutes-build-win32-x64": "0.4.3"
40
+ "chutes-build-darwin-arm64": "1.0.1",
41
+ "chutes-build-darwin-x64": "1.0.1",
42
+ "chutes-build-linux-arm64-gnu": "1.0.1",
43
+ "chutes-build-linux-x64-gnu": "1.0.1",
44
+ "chutes-build-win32-arm64": "1.0.1",
45
+ "chutes-build-win32-x64": "1.0.1"
46
46
  },
47
47
  "keywords": [
48
48
  "ai",