chutes-build 0.4.1 → 0.4.3

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 ADDED
@@ -0,0 +1,481 @@
1
+ # Changelog
2
+
3
+ All notable changes to Chutes Build will be documented in this file. The format
4
+ is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this
5
+ project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [0.4.3] - 2026-08-03
10
+
11
+ ### Added
12
+
13
+ - The `browser` tool gained the actions its workflow was missing: `wait`
14
+ (until a selector is visible or page text appears), `key` (`Enter`, `Tab`,
15
+ `Escape`, arrows, `Home`/`End`, `PageUp`/`PageDown`), `scroll`, `select`,
16
+ `back`, `reload`, `text` (full visible page text), and `console` / `network`,
17
+ which report the session's browser logs, uncaught errors, and requests.
18
+ - Documented desktop control as an opt-in MCP integration, including what
19
+ enabling it gives away, since no built-in tool captures the screen or
20
+ synthesizes input.
21
+ - `--output-format streaming-messages-json` emits headless output in the
22
+ Anthropic Messages API wire shape: a `system`/`init` line, `assistant` lines
23
+ whose `content[]` carries thinking, text and `tool_use` blocks, `user` lines
24
+ carrying each `tool_result`, and a final `result`. Ported from upstream.
25
+ - `streaming-json` now reports tool activity as `tool_call` and
26
+ `tool_call_update` lines. The headless runner ignored ACP tool-call updates
27
+ entirely, so a consumer could see the agent's prose but never what it did.
28
+ - `CHUTES_EXTRA_CA_BUNDLE` adds extra TLS roots from a PEM bundle, for networks
29
+ where a proxy terminates TLS with its own root. Opt-in and additive: unset by
30
+ default, never replaces the built-in roots, and never disables verification.
31
+ A bundle that is oversized, unreadable, or unparseable is reported and
32
+ ignored instead of breaking every request. Ported from upstream, reworked to
33
+ use reqwest's own PEM bundle parsing rather than adding a crate to the
34
+ generated workspace root.
35
+
36
+ ### Fixed
37
+
38
+ - `browser click` now focuses the element before clicking, matching a real
39
+ pointer click. Without it a click on a field left focus on the body, so a
40
+ following `key` went nowhere.
41
+ - Cancelling now stops an in-flight `/compact`. Compaction runs as a command
42
+ rather than a turn, so the cancel path returned early and left a long
43
+ compaction running with no way to stop it. Other commands are unaffected.
44
+ Ported from upstream.
45
+ - Saving MCP settings no longer discards the rest of `config.toml`. Every MCP
46
+ writer parsed the file with a fallback to an empty table, so one syntax error
47
+ turned the next save into a full rewrite containing only what that call was
48
+ persisting. Unparseable configs are now refused, the user-config write lock
49
+ covers the whole read-modify-write so concurrent saves cannot erase each
50
+ other, and writes go through the shared atomic helper instead of a fixed
51
+ temporary filename two writers could collide on. Ported from upstream.
52
+ - The encrypted prompt templates no longer depend on how the repository was
53
+ checked out. Generator and staleness test compared raw `include_str!` bytes,
54
+ so arrays built on a CRLF working tree matched only on Windows; both sides
55
+ now fold line endings first, which also makes the decrypted prompt
56
+ byte-identical on every platform.
57
+ - Two pager tests no longer depend on the machine they run on: one budgeted its
58
+ wait in poll counts rather than elapsed time, and two built past instants by
59
+ subtracting more than the machine's uptime, which panics on a recently booted
60
+ box or a fresh CI runner.
61
+ - `/advisor` now spawns. Its curated toolset already declares `memory_search`,
62
+ `memory_get` and `web_fetch`, and session-level injection appended a second
63
+ copy of each; both entries resolved to one client-facing name, so toolset
64
+ validation rejected the agent with `duplicate client_name` on every attempt.
65
+ Injection now skips tools the agent already declares.
66
+ - Bundled skills cited tool names the model is never shown (`task` is exposed
67
+ as `spawn_subagent`, `run_in_background` as `background`), sending it after
68
+ tools absent from its schema. Names corrected in `/best-of-n` and
69
+ `/check-work`, with a test tying skill text to the advertised names.
70
+ - Repaired the nine stale `xai-grok-agent` tests: two asserted behavior the
71
+ code no longer has (retired `grok_*` toolset presets, `web_search` before it
72
+ became a default-on native provider), three compared prompt budgets against
73
+ raw `include_str!` output that a CRLF checkout inflates, two compared paths
74
+ with hardcoded forward slashes, and two staged a fake home through `$HOME`,
75
+ which `dirs::home_dir` honours only on Unix. The two home-dependent rules are
76
+ now split into injectable helpers covered on every platform, and their
77
+ environment-driven integration tests are marked Unix-only.
78
+ - The CI Rust job now runs the `xai-grok-agent` library tests and the bundled
79
+ skill checks, which were previously never executed by any workflow.
80
+
81
+ ### Changed
82
+
83
+ - `generate_media` is self-contained: it resolves a plain model name against
84
+ the catalog and places the new top-level `prompt` into whatever text field
85
+ the selected cord declares, so `{model, kind, prompt}` is a complete call.
86
+ `params` is now optional and only needed for non-default settings or input
87
+ assets, and schema-mismatch errors list the accepted fields instead of
88
+ directing the caller back to `describe_media_model`. The `/imagine`,
89
+ `/imagine-video` and `imagine` skill instructions no longer mandate the
90
+ three-call list → describe → generate sequence.
91
+ - Updated the pinned `actions/checkout` workflow dependency to `v7.0.1`,
92
+ including its Git argument escaping and pull-request safety fixes.
93
+
94
+ ### Security
95
+
96
+ - Marked the three synthetic secret-detection fixtures explicitly so both
97
+ worktree and full-history Gitleaks scans pass without weakening real-secret
98
+ detection.
99
+
100
+ ### Documentation
101
+
102
+ - Recorded the CodeQL static-analysis triage in the security review: current
103
+ alert counts, the disposition of each query, and the reachability argument
104
+ showing the retained upstream backend client cannot run while
105
+ `REMOTE_SESSION_REGISTRY` is `false`.
106
+ - Documented the pinned Rust/Node toolchain, the single supported package
107
+ manager, the artifacts the project actually produces, the protected assets
108
+ and generated files, and the repository-visibility rules in `AGENTS.md`.
109
+ - Described the advisor's actual read-only toolset and the `/advisor` controls
110
+ in the subagents guide, and recorded the self-contained `generate_media`
111
+ workflow in the Chutes ecosystem and MCP guides.
112
+ - Listed the browser tool's full action set — what each reading action reports
113
+ and how elements are addressed — in the web and browser guide, and documented
114
+ `CHUTES_EXTRA_CA_BUNDLE` alongside the endpoint settings.
115
+ - Documented both headless streaming formats and what each line carries in the
116
+ CLI reference, and noted in the slash-command list that `/compact` can now be
117
+ stopped while it runs.
118
+
119
+ ## [0.4.2] - 2026-08-01
120
+
121
+ ### Added
122
+
123
+ - `/undo` is accepted as an alias for `/rewind`.
124
+ - Added repository-wide coding-agent guidance and editor defaults.
125
+ - The npm launcher archive now includes the changelog and security policy.
126
+
127
+ ### Changed
128
+
129
+ - Reviewed Grok Build upstream through `0.2.117` and recorded the selective
130
+ port and deferral decisions.
131
+ - Removed the orphaned Dependabot auto-merge workflow after automated version
132
+ update PRs were disabled.
133
+ - The Windows CI job no longer disables real-time malware protection.
134
+
135
+ ### Fixed
136
+
137
+ - Repeated-tool-call reminders are injected only after the preceding tool
138
+ results are committed, preventing duplicate results from corrupting session
139
+ history.
140
+ - Empty Enter no longer silently approves a plan while the revision prompt is
141
+ focused; revision notes are required, with `a` as the explicit approve key.
142
+ - Notification-hook tests that launch external shells are serialized, avoiding
143
+ Windows CI failures caused by concurrent PowerShell startup contention.
144
+ - The asynchronous notification-hook test now joins its worker before checking
145
+ output, removing a race with slow PowerShell startup on loaded CI runners.
146
+ - Removed Rust 1.94 Clippy warnings in the Windows crash handler, PTY text
147
+ rendering, and workspace utilities without changing their behavior.
148
+ - Notification events without an owning session explicitly remove any stale
149
+ `CHUTES_BUILD_SESSION_ID` inherited from the parent process.
150
+
151
+ ### Security
152
+
153
+ - Documented and aligned repository security controls for SHA-pinned Actions,
154
+ read-only workflow tokens, and reviewed security-update PRs.
155
+ - Updated vulnerable transitive `rand` and AWS SDK lockfile entries to their
156
+ first compatible patched releases.
157
+
158
+ ## [0.4.1] - 2026-07-26
159
+
160
+ ### Added
161
+
162
+ - Remote ACP background terminal tasks now persist their cumulative output
163
+ locally while they run; terminal results use the real remote exit status.
164
+ - Repeated identical tool calls are detected, warned about, and eventually
165
+ stopped without emitting a misleading assistant response; repeated `true`
166
+ no-ops use a shorter limit.
167
+
168
+ ### Changed
169
+
170
+ - Dependabot auto-merge is limited to patch updates. Minor and major updates
171
+ remain open for manual review.
172
+ - The upstream-watch workflow refreshes the existing review issue with the
173
+ current upstream commit and version instead of leaving stale issue content.
174
+ - Plugin subagents inherit the parent's already-connected MCP pool through the
175
+ normal inheritance filter, without allowing plugins to create connections.
176
+ - A fresh managed-MCP catalog is propagated to live sessions and refreshes the
177
+ tool-search index without requiring an application restart.
178
+
179
+ ### Fixed
180
+
181
+ - Session-creation failures now clear the stuck loading state, remove orphaned
182
+ sessions, and surface a useful warning or failure block.
183
+ - A bare `Esc` cancels a running turn in non-vim and minimal modes while
184
+ fullscreen vim retains navigation semantics; the queued draft is preserved.
185
+ - Fork/rewind copies only live history and the compaction checkpoint files it
186
+ actually references, rejecting malformed paths and non-regular files.
187
+
188
+ ### Security
189
+
190
+ - Chutes and Context7 endpoint resolution now rejects insecure schemes,
191
+ credentials in URLs, private/special-use network targets, and unapproved
192
+ custom endpoints unless the corresponding explicit development opt-in is
193
+ enabled. API keys are never sent to custom Context7 endpoints.
194
+ - Generated media streams to temporary files with bounded response sizes and
195
+ uses create-new persistence so existing artifacts cannot be overwritten.
196
+ - Automatic permission classification only fast-paths deterministic read-only
197
+ shell commands; classifier failures fall back to the normal user prompt.
198
+ - Permission resolution now honors the folder-trust verdict: an untrusted
199
+ project's `.claude/settings.json` (including `defaultMode: bypassPermissions`)
200
+ and `.chutes-build/config.toml` `[permission]` rules are no longer
201
+ auto-applied. A cloned repository could previously ship permission rules
202
+ that auto-approved tool calls regardless of the folder's trust state. Global
203
+ and admin-tier permission sources are unaffected. Found while reviewing
204
+ upstream grok-build for changes worth porting.
205
+
206
+ ### Documentation
207
+
208
+ - Reworked the README around a concise product overview, static terminal
209
+ screenshot, quick start, privacy contract, common workflows, and repository
210
+ map; removed the obsolete promotional video assets.
211
+ - Added dedicated getting-started and configuration guides, reorganized the
212
+ documentation index, and aligned privacy, security, architecture, npm,
213
+ contributor, and embedded `/docs` references with current behavior.
214
+ - Corrected OAuth guidance, media response limits, automatic-permission
215
+ semantics, remote terminal behavior, `Esc` cancellation, and upstream
216
+ baseline rules.
217
+
218
+ ## [0.4.0] - 2026-07-23
219
+
220
+ ### Added
221
+
222
+ - Machine-readable `--json` output for the model catalog and local session
223
+ list/search/delete commands.
224
+ - Headless worktree creation, including `--worktree-ref`, and headless
225
+ `--no-subagents` / memory controls.
226
+ - CSS-selector or snapshot-index addressing for browser click/type actions.
227
+ - A complete public CLI and slash-command reference.
228
+
229
+ ### Changed
230
+
231
+ - Session storage, search, deletion, traces, and workspace state are now
232
+ enforced as local-only product policy. Inherited remote write-back settings
233
+ cannot override it.
234
+ - Updates are manual through npm/release artifacts. The runtime no longer links
235
+ or starts the inherited automatic updater.
236
+ - Custom model catalogs use `CHUTES_MODELS_API_KEY`; ambient Chutes API/session
237
+ credentials are restricted to allowlisted official HTTPS endpoints.
238
+ - Destructive session, memory, plugin, marketplace, and worktree operations
239
+ require confirmation or an explicit `--yes`.
240
+
241
+ ### Fixed
242
+
243
+ - OAuth login (`l` / `/login`, "Sign in with Chutes"): the token exchange (and
244
+ now refresh) send a `client_secret` when one is configured. The built-in app
245
+ (`cid_nyt9i...`) currently rejects the token exchange with `invalid_client`
246
+ unless a secret is sent, despite being documented as a public PKCE client —
247
+ confirmed by isolating scope as a non-factor in a controlled A/B test.
248
+ `openid` is also requested again — Chutes' own app docs list it as
249
+ required, contradicting the assumption an earlier revision of this list was
250
+ based on.
251
+ - A `client_secret` supplied via `CHUTES_BUILD_OAUTH2_CLIENT_SECRET` /
252
+ `CHUTES_BUILD_OIDC_CLIENT_SECRET` was silently dropped before reaching the
253
+ token request whenever `config.toml` also had an
254
+ `[grok_com_config.oidc]`/`[oauth2]` table: the config merge round-trips
255
+ through a generic TOML value, which does not preserve fields marked
256
+ `#[serde(skip)]`.
257
+ - Relative `--cwd` values are canonicalized before changing directories,
258
+ avoiding a second relative-path resolution.
259
+ - `--load` now behaves as an alias of `--resume`; resume/restore conflicts,
260
+ headless-only options, `--no-plan`, `--best-of-n`, and prompt/subcommand
261
+ combinations fail with actionable parser errors instead of being ignored.
262
+ - Agent `--reauthenticate`, `--reasoning-effort`, model-list cancellation,
263
+ export/clipboard failures, worktree partial failures, plugin registry
264
+ failures, and custom OAuth refresh secrets now behave consistently.
265
+ - `CHUTES_BUILD_HOME` now relocates user roles/personas and the bundled-agent
266
+ cache together with the rest of the application state, including on Windows.
267
+ - Media writes roll back partial artifacts when either media or provenance
268
+ persistence fails.
269
+
270
+ ### Security
271
+
272
+ - Removed the hidden remote workspace-exposure CLI and disabled the matching
273
+ leader protocol capability.
274
+ - `mcp list --json` redacts environment/header values, command arguments, and
275
+ URL credentials/query/fragment data.
276
+ - `agent serve` defaults to loopback, rejects short secrets, and requires
277
+ `--allow-remote-bind` for non-loopback listeners.
278
+ - Plugin/marketplace removal and generated-media persistence now surface
279
+ partial failures instead of reporting false success.
280
+
281
+ ### Removed
282
+
283
+ - Inherited remote share, feedback, coding-data retention, update, setup, and
284
+ workspace-exposure commands that were unavailable or incompatible with the
285
+ Chutes Build privacy contract.
286
+ - The no-op `trace --local`, `agent serve --remote`, and duplicate load/update
287
+ flags.
288
+
289
+ ### Documentation
290
+
291
+ - README: documented the OAuth environment variables and the custom-client
292
+ fallback.
293
+
294
+ ## [0.3.0] - 2026-07-22
295
+
296
+ ### Added
297
+
298
+ - Voice recording bar: an animated wave visual while the mic is capturing.
299
+ - Auto-update checks re-enabled (were previously hardcoded off regardless of
300
+ config or CLI flag). Still off in debug builds; honors `--no-auto-update`
301
+ and the new `CHUTES_BUILD_DISABLE_AUTOUPDATER` env var.
302
+
303
+ ### Fixed
304
+
305
+ - Voice dictation actually works now: default transcription switched to a
306
+ batch REST call against Chutes' own STT endpoint. The prior WebSocket
307
+ streaming client only ever worked against the original upstream backend —
308
+ every dictation attempt against Chutes' inference API failed with a
309
+ WebSocket 404 (no such route exists there). The streaming transport is
310
+ still available (`stt_mode = "streaming"`) for a backend that speaks it.
311
+ - Voice dictation: the 10-second no-speech timeout now distinguishes true mic
312
+ silence (permissions, muted input) from other failures and surfaces a
313
+ platform-specific fix hint instead of one generic message.
314
+ - Sampler: a zero-retry budget now fails fast instead of silently falling
315
+ through the generic/rate-limit retry paths; retry backoff sleeps are now
316
+ cancellable, so a cancelled request during backoff no longer waits out the
317
+ full delay.
318
+
319
+ ### Security
320
+
321
+ - Sandbox: fixed a fail-open bypass where an unopenable device file (e.g.
322
+ `/dev/tty` with no controlling terminal under headless/CI) aborted the
323
+ entire Landlock/Seatbelt ruleset instead of just skipping that one rule,
324
+ leaving the sandbox unenforced.
325
+ - Permission auto-mode and exec-risk classification brought forward from a
326
+ stale pre-0.2.106 baseline: kubectl/`ps`/`rg` heuristic hardening
327
+ (credential-plugin and environment-dump risks), a 3-tier environment-risk
328
+ model replacing a binary check, opaque-shell detection, an ambient
329
+ exec-risk scan for `git -C`/`--git-dir`/submodule config paths, and
330
+ reinstated consecutive/total auto-deny limits.
331
+ - MCP tool permission checks now use an overlap-aware `server__tool` name
332
+ parser (rejects names with more than one delimiter boundary) instead of
333
+ splitting on the first occurrence.
334
+
335
+ ## [0.2.0] - 2026-07-22
336
+
337
+ ### Added
338
+
339
+ - Chutes-native inference, model discovery, automatic routing, and fallback
340
+ handling.
341
+ - Adaptive reasoning controls backed by a centralized model capability
342
+ registry.
343
+ - Advisor and parallel subagent orchestration.
344
+ - Built-in Context7, official Chutes research, web search, browser automation,
345
+ and project memory.
346
+ - Chutes usage indicators for rolling four-hour and monthly limits.
347
+ - Typed image, video, and audio artifacts with bounded, opt-in terminal
348
+ previews and native-player fallbacks.
349
+ - Privacy-first defaults with telemetry, remote trace upload, and automatic
350
+ update checks disabled.
351
+ - Cross-platform npm launcher and native package pipeline.
352
+ - Voice dictation (`/voice`, Ctrl+Space, or the mic icon), enabled by default;
353
+ recording still starts only on an explicit manual press.
354
+ - Hybrid memory search enabled by default: local recall now combines full-text
355
+ search with semantic vector search against a built-in Chutes-hosted
356
+ embedding model (`Qwen/Qwen3-Embedding-8B-TEE`).
357
+ - Advisor now reasons at maximum effort by default (previously inherited
358
+ whatever effort the parent session was using). `/advisor on|off` enables or
359
+ disables the subagent; `/advisor <model>` pins the model it uses;
360
+ `/advisor default` clears the pin. Writes `[subagents.roles.advisor]` /
361
+ `[subagents.toggle]` in config.toml — the running session's own model is
362
+ never touched.
363
+ - On-demand OCR (`ocr_page` tool): extracts text verbatim from a single image
364
+ or PDF page via a dedicated Chutes vision model, independent of the active
365
+ chat model's vision support. Billed against the account's subscription
366
+ quota, never the separate marketplace/wallet balance third-party chutes use.
367
+
368
+ ### Changed
369
+
370
+ - Rebranded the public product, binary, user data directory, and themes as
371
+ Chutes Build.
372
+ - Cached FFmpeg and package-manager discovery for the lifetime of the process
373
+ so idle TUI rendering does not repeatedly probe external commands.
374
+ - Bounded account quota fallback concurrency and cached model-capability
375
+ discovery to reduce unnecessary API work.
376
+ - The model-capability catalog response and the vision transcription client's
377
+ chat-completion response are now parsed into small typed structs instead of
378
+ navigated as raw JSON, so an unexpected shape in a field we don't read can't
379
+ silently change behavior; fields whose absence or wrong shape must stay a
380
+ soft "not found"/"no match" (a model's `input_modalities`, a transcription's
381
+ `content`/`finish_reason`) are still parsed leniently, only genuinely
382
+ malformed responses now surface as a distinct decode error. Account usage
383
+ and per-chute media responses stay dynamic on purpose — their shapes
384
+ legitimately vary per tier/quota kind and per third-party chute schema.
385
+
386
+ ### Fixed
387
+
388
+ - Interactive login: the welcome screen and `/login` had no working path to
389
+ the OAuth method the rebrand advertised, and no way to enter an API key
390
+ from inside the running app at all (only the separate `chutes-build login`
391
+ CLI subcommand worked, before ever starting the TUI). Added "Sign in with
392
+ Chutes" OAuth end-to-end (issuer, client, scopes, loopback callback) and an
393
+ in-TUI API key entry reachable from the welcome screen (`k`), `/login`, and
394
+ `/apikey`, and fixed two stale-state bugs (`auth_show_raw_url`,
395
+ `welcome_prompt_focused`) that silently swallowed keyboard input on the
396
+ auth screen.
397
+ - `get_chutes_usage` and all media tools 401'd by default: the account/media
398
+ HTTP client sent the API key without the `Bearer` prefix `api.chutes.ai`
399
+ requires.
400
+ - The macOS native build failed to compile (a stray `cfg` left an
401
+ `std::process` import unreachable in a macOS-only module).
402
+ - The secret sanitizer that filters Sentry/Mixpanel/log output did not
403
+ recognize the `cpk_` Chutes API key prefix, so real keys were not redacted
404
+ from those sinks.
405
+ - The browser automation tool left a dead session in place after any
406
+ connection-level failure (closed socket, crashed browser), making it
407
+ unusable for the rest of the session until an explicit `close`.
408
+ - `generate_media` only validated the top-level shape of `params` against a
409
+ cord's schema, so a payload with the right outer wrapper (e.g. `args`) but
410
+ wrong fields nested inside it passed local validation and round-tripped to
411
+ Chutes for a generic "Invalid input parameters" error instead of a precise
412
+ local one.
413
+ - The terminal window/tab title showed "grok" instead of "chutes-build".
414
+ - Memory embeddings always sent requests to the chat completion base URL
415
+ (`llm.chutes.ai`, which does not proxy `/embeddings` and 404s), and
416
+ unconditionally requested Matryoshka-truncated output via a `dimensions`
417
+ field the default embedding model rejects outright (400). Together these
418
+ made vector memory search completely unusable even when `[memory.embedding]`
419
+ was explicitly configured. Embeddings now use their own configurable base
420
+ URL (defaulting to the model's dedicated endpoint) and no longer request
421
+ truncation.
422
+ - `generate_media` only encoded workspace file paths found at the top level
423
+ of `params`; a cord requiring a wrapper shape (e.g. `{"args": {"image":
424
+ "input.png"}}`) never got its nested path encoded, so the literal filename
425
+ round-tripped to Chutes instead of the file's contents. Asset discovery now
426
+ recurses through nested objects and arrays.
427
+ - `generate_media`'s schema guard unconditionally overwrote a cord's own
428
+ `additionalProperties`/`unevaluatedProperties` with its own default —
429
+ including stripping them entirely when `CHUTES_ALLOW_UNKNOWN_PARAMS` was
430
+ set, removing a restriction the provider declared rather than just
431
+ disabling this tool's own default. It now only adds its own restriction
432
+ where the schema has no existing opinion.
433
+ - `generate_media` accepted any response with an empty or `octet-stream`
434
+ Content-Type outright, so a Chutes error response (HTML/JSON, sometimes
435
+ served as `octet-stream` by a proxy) could be saved to disk as if it were
436
+ the requested media. Responses are now verified against actual byte
437
+ content, not just the declared header.
438
+ - The model-capability catalog cache held a single global lock for the
439
+ entire network refresh, serializing every concurrent lookup behind one
440
+ HTTP request whenever the cache was stale.
441
+ - On the Windows native build, file-tool path remapping (`resolve_model_path`)
442
+ and the `.gitignore` out-of-repo guard both tested `Path::is_absolute()`,
443
+ which on Windows also requires a drive letter. The forward-slash-rooted
444
+ virtual paths these paths actually deal with (e.g. a sandboxed session's
445
+ `/home/user/project`) were therefore misclassified as relative, silently
446
+ breaking model-facing path resolution and letting an out-of-repo path fall
447
+ through to a crate call that can panic. Both now check for a root instead
448
+ of a full drive-qualified absolute path.
449
+ - On the Windows native build, LSP crash-recovery silently failed to replay
450
+ a server's previously-open documents after a restart: it derived each
451
+ document's file path by stripping the literal `"file://"` prefix off its
452
+ URI, which on Windows leaves an invalid leading slash before the drive
453
+ letter (`/C:/...`), so the on-disk re-read failed and the document was
454
+ quietly dropped instead of being replayed. Now uses proper file-URI-to-path
455
+ conversion.
456
+
457
+ ### Security
458
+
459
+ - Restricted credential-bearing media invocation to Chutes HTTPS hosts,
460
+ disabled credential-bearing redirects, and bounded generated-media and input
461
+ asset sizes.
462
+ - Restricted browser and media output paths to canonical workspace locations,
463
+ prevented silent file overwrite, and redacted password values from browser
464
+ snapshots.
465
+ - Added full-history secret scanning, Rust dependency/source policy checks,
466
+ native archive checksums, and assembled-package smoke testing to CI.
467
+ - `CHUTES_INFERENCE_BASE_URL`/`CHUTES_API_BASE_URL`/`CHUTES_ROUTER_BASE_URL`
468
+ previously accepted any value with no validation, so an env-var override
469
+ could silently redirect Chutes credentials to an arbitrary host. These
470
+ (and the model-router dispatch path, which had the same gap) now require
471
+ HTTPS and a trusted Chutes/router host by default; `CHUTES_ALLOW_INSECURE_ENDPOINTS`
472
+ is an explicit opt-in for local development and forks.
473
+ - Outbound requests for Chutes credentials and generated-media downloads now
474
+ refuse to connect to loopback/private/link-local/reserved addresses,
475
+ checked at the exact point of connection (closing a DNS-rebinding gap
476
+ where only literal IP addresses were previously rejected).
477
+ - Unified secret detection: Context7's outbound-query guard and persistent
478
+ memory filtering matched only 12 hardcoded substrings (`api_key`,
479
+ `bearer`, `password`, ...) and could miss shapes like a bare AWS key or
480
+ GitHub token that the existing log/trace sanitizer already caught. Both
481
+ now route through the same canonical detector.
package/README.md CHANGED
@@ -148,6 +148,8 @@ set. See the [CLI reference](docs/cli-reference.md) and
148
148
  - [CLI reference](docs/cli-reference.md) and
149
149
  [slash commands](docs/slash-commands.md) — public command surfaces.
150
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.
151
153
  - [Privacy](PRIVACY.md), [security policy](SECURITY.md), and
152
154
  [security review](docs/security-review.md) — operational trust boundaries.
153
155
  - [Documentation index](docs/README.md) — complete user, maintainer, and design
@@ -174,11 +176,12 @@ The executable is `target\release\chutes-build.exe` on Windows and
174
176
 
175
177
  | Path | Ownership |
176
178
  | --- | --- |
179
+ | `AGENTS.md` | Repository-wide guidance and verification contract for coding agents. |
177
180
  | `crates/chutes-build-core/` | Chutes routing, endpoint policy, catalog, reasoning, account, media, privacy, and product policy. |
178
181
  | `crates/codegen/` | Retained and adapted upstream runtime crates. Keep crate names stable to make upstream review practical. |
179
182
  | `npm/` | Native launcher, platform-package assembly, and npm verification. |
180
183
  | `docs/` | Public technical references, maintainer procedures, and design records. |
181
- | `.github/workflows/` | CI, dependency review, upstream monitoring, and release packaging. |
184
+ | `.github/workflows/` | CI, security policy checks, upstream monitoring, and release packaging. |
182
185
  | `prod/` and `third_party/` | Shared protocol sources and retained attribution/material from upstream. |
183
186
 
184
187
  The root `Cargo.toml` is generated and treated as read-only. Make dependency
@@ -193,8 +196,9 @@ are reviewed and ported selectively; they are never merged or released
193
196
  automatically. See [Upstream synchronization](docs/upstream-sync.md).
194
197
 
195
198
  Issues and focused pull requests are welcome. Read
196
- [CONTRIBUTING.md](CONTRIBUTING.md), [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md),
197
- and [SECURITY.md](SECURITY.md) before contributing.
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.
198
202
 
199
203
  Apache-2.0 licensing and attribution are documented in [LICENSE](LICENSE),
200
204
  [NOTICE](NOTICE), and [THIRD-PARTY-NOTICES](THIRD-PARTY-NOTICES).
package/SECURITY.md ADDED
@@ -0,0 +1,73 @@
1
+ # Security Policy
2
+
3
+ ## Supported versions
4
+
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.
8
+
9
+ ## Reporting a vulnerability
10
+
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.
14
+
15
+ Include:
16
+
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.
23
+
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.
27
+
28
+ ## Security boundaries
29
+
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.
35
+
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).
package/npm/README.md CHANGED
@@ -5,6 +5,11 @@ optional dependencies contain the native Rust executable for each supported
5
5
  platform, so installation does not require Rust and does not download an
6
6
  executable from a lifecycle script.
7
7
 
8
+ The launcher archive includes the product README, changelog, security and
9
+ privacy policies, license, and notice. It deliberately defines no install or
10
+ post-install lifecycle script; executable selection happens only when the
11
+ `chutes-build` command runs.
12
+
8
13
  Supported release targets:
9
14
 
10
15
  - Windows x64 and ARM64
@@ -12,7 +17,8 @@ Supported release targets:
12
17
  - Linux glibc x64 and ARM64
13
18
 
14
19
  For installation and first-run instructions, see the repository
15
- [`README`](../README.md) and [getting-started guide](../docs/getting-started.md).
20
+ [`README`](../README.md) and the
21
+ [getting-started guide](https://github.com/TheStreamCode/chutes-build/blob/main/docs/getting-started.md).
16
22
 
17
23
  ## Prepare a platform package
18
24
 
@@ -33,12 +39,17 @@ or test scripts. Validate release metadata before packaging:
33
39
 
34
40
  ```powershell
35
41
  npm run verify:release
42
+ npm test
43
+ npm pack --dry-run
36
44
  ```
37
45
 
38
46
  The manual GitHub Actions workflow in `.github/workflows/package-release.yml`
39
47
  builds all six native packages. Its publish input is disabled by default and
40
- requires the protected `npm-release` environment when enabled. See
41
- [`docs/releasing.md`](../docs/releasing.md) for the full release procedure.
48
+ requires the `npm-release` environment when enabled. Native archives
49
+ are published before the launcher, every publish uses npm provenance, and an
50
+ already published package/version is skipped during a recovery run. See
51
+ the [release procedure](https://github.com/TheStreamCode/chutes-build/blob/main/docs/releasing.md)
52
+ for the complete workflow.
42
53
 
43
54
  ## Verify the launcher
44
55
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chutes-build",
3
- "version": "0.4.1",
3
+ "version": "0.4.3",
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)",
@@ -24,22 +24,25 @@
24
24
  "README.md",
25
25
  "LICENSE",
26
26
  "NOTICE",
27
- "PRIVACY.md"
27
+ "PRIVACY.md",
28
+ "SECURITY.md",
29
+ "CHANGELOG.md"
28
30
  ],
29
31
  "engines": {
30
32
  "node": ">=18"
31
33
  },
32
34
  "scripts": {
33
35
  "test": "node --test npm/tests/*.test.cjs",
34
- "verify:release": "node npm/scripts/verify-release.mjs"
36
+ "verify:release": "node npm/scripts/verify-release.mjs",
37
+ "check": "npm test && npm run verify:release && npm pack --dry-run"
35
38
  },
36
39
  "optionalDependencies": {
37
- "chutes-build-darwin-arm64": "0.4.1",
38
- "chutes-build-darwin-x64": "0.4.1",
39
- "chutes-build-linux-arm64-gnu": "0.4.1",
40
- "chutes-build-linux-x64-gnu": "0.4.1",
41
- "chutes-build-win32-arm64": "0.4.1",
42
- "chutes-build-win32-x64": "0.4.1"
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"
43
46
  },
44
47
  "keywords": [
45
48
  "ai",