chutes-build 0.1.0

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/LICENSE ADDED
@@ -0,0 +1,204 @@
1
+ Copyright 2023-2026 SpaceXAI
2
+
3
+
4
+ Apache License
5
+ Version 2.0, January 2004
6
+ http://www.apache.org/licenses/
7
+
8
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
9
+
10
+ 1. Definitions.
11
+
12
+ "License" shall mean the terms and conditions for use, reproduction,
13
+ and distribution as defined by Sections 1 through 9 of this document.
14
+
15
+ "Licensor" shall mean the copyright owner or entity authorized by
16
+ the copyright owner that is granting the License.
17
+
18
+ "Legal Entity" shall mean the union of the acting entity and all
19
+ other entities that control, are controlled by, or are under common
20
+ control with that entity. For the purposes of this definition,
21
+ "control" means (i) the power, direct or indirect, to cause the
22
+ direction or management of such entity, whether by contract or
23
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
24
+ outstanding shares, or (iii) beneficial ownership of such entity.
25
+
26
+ "You" (or "Your") shall mean an individual or Legal Entity
27
+ exercising permissions granted by this License.
28
+
29
+ "Source" form shall mean the preferred form for making modifications,
30
+ including but not limited to software source code, documentation
31
+ source, and configuration files.
32
+
33
+ "Object" form shall mean any form resulting from mechanical
34
+ transformation or translation of a Source form, including but
35
+ not limited to compiled object code, generated documentation,
36
+ and conversions to other media types.
37
+
38
+ "Work" shall mean the work of authorship, whether in Source or
39
+ Object form, made available under the License, as indicated by a
40
+ copyright notice that is included in or attached to the work
41
+ (an example is provided in the Appendix below).
42
+
43
+ "Derivative Works" shall mean any work, whether in Source or Object
44
+ form, that is based on (or derived from) the Work and for which the
45
+ editorial revisions, annotations, elaborations, or other modifications
46
+ represent, as a whole, an original work of authorship. For the purposes
47
+ of this License, Derivative Works shall not include works that remain
48
+ separable from, or merely link (or bind by name) to the interfaces of,
49
+ the Work and Derivative Works thereof.
50
+
51
+ "Contribution" shall mean any work of authorship, including
52
+ the original version of the Work and any modifications or additions
53
+ to that Work or Derivative Works thereof, that is intentionally
54
+ submitted to Licensor for inclusion in the Work by the copyright owner
55
+ or by an individual or Legal Entity authorized to submit on behalf of
56
+ the copyright owner. For the purposes of this definition, "submitted"
57
+ means any form of electronic, verbal, or written communication sent
58
+ to the Licensor or its representatives, including but not limited to
59
+ communication on electronic mailing lists, source code control systems,
60
+ and issue tracking systems that are managed by, or on behalf of, the
61
+ Licensor for the purpose of discussing and improving the Work, but
62
+ excluding communication that is conspicuously marked or otherwise
63
+ designated in writing by the copyright owner as "Not a Contribution."
64
+
65
+ "Contributor" shall mean Licensor and any individual or Legal Entity
66
+ on behalf of whom a Contribution has been received by Licensor and
67
+ subsequently incorporated within the Work.
68
+
69
+ 2. Grant of Copyright License. Subject to the terms and conditions of
70
+ this License, each Contributor hereby grants to You a perpetual,
71
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
72
+ copyright license to reproduce, prepare Derivative Works of,
73
+ publicly display, publicly perform, sublicense, and distribute the
74
+ Work and such Derivative Works in Source or Object form.
75
+
76
+ 3. Grant of Patent License. Subject to the terms and conditions of
77
+ this License, each Contributor hereby grants to You a perpetual,
78
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
79
+ (except as stated in this section) patent license to make, have made,
80
+ use, offer to sell, sell, import, and otherwise transfer the Work,
81
+ where such license applies only to those patent claims licensable
82
+ by such Contributor that are necessarily infringed by their
83
+ Contribution(s) alone or by combination of their Contribution(s)
84
+ with the Work to which such Contribution(s) was submitted. If You
85
+ institute patent litigation against any entity (including a
86
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
87
+ or a Contribution incorporated within the Work constitutes direct
88
+ or contributory patent infringement, then any patent licenses
89
+ granted to You under this License for that Work shall terminate
90
+ as of the date such litigation is filed.
91
+
92
+ 4. Redistribution. You may reproduce and distribute copies of the
93
+ Work or Derivative Works thereof in any medium, with or without
94
+ modifications, and in Source or Object form, provided that You
95
+ meet the following conditions:
96
+
97
+ (a) You must give any other recipients of the Work or
98
+ Derivative Works a copy of this License; and
99
+
100
+ (b) You must cause any modified files to carry prominent notices
101
+ stating that You changed the files; and
102
+
103
+ (c) You must retain, in the Source form of any Derivative Works
104
+ that You distribute, all copyright, patent, trademark, and
105
+ attribution notices from the Source form of the Work,
106
+ excluding those notices that do not pertain to any part of
107
+ the Derivative Works; and
108
+
109
+ (d) If the Work includes a "NOTICE" text file as part of its
110
+ distribution, then any Derivative Works that You distribute must
111
+ include a readable copy of the attribution notices contained
112
+ within such NOTICE file, excluding those notices that do not
113
+ pertain to any part of the Derivative Works, in at least one
114
+ of the following places: within a NOTICE text file distributed
115
+ as part of the Derivative Works; within the Source form or
116
+ documentation, if provided along with the Derivative Works; or,
117
+ within a display generated by the Derivative Works, if and
118
+ wherever such third-party notices normally appear. The contents
119
+ of the NOTICE file are for informational purposes only and
120
+ do not modify the License. You may add Your own attribution
121
+ notices within Derivative Works that You distribute, alongside
122
+ or as an addendum to the NOTICE text from the Work, provided
123
+ that such additional attribution notices cannot be construed
124
+ as modifying the License.
125
+
126
+ You may add Your own copyright statement to Your modifications and
127
+ may provide additional or different license terms and conditions
128
+ for use, reproduction, or distribution of Your modifications, or
129
+ for any such Derivative Works as a whole, provided Your use,
130
+ reproduction, and distribution of the Work otherwise complies with
131
+ the conditions stated in this License.
132
+
133
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
134
+ any Contribution intentionally submitted for inclusion in the Work
135
+ by You to the Licensor shall be under the terms and conditions of
136
+ this License, without any additional terms or conditions.
137
+ Notwithstanding the above, nothing herein shall supersede or modify
138
+ the terms of any separate license agreement you may have executed
139
+ with Licensor regarding such Contributions.
140
+
141
+ 6. Trademarks. This License does not grant permission to use the trade
142
+ names, trademarks, service marks, or product names of the Licensor,
143
+ except as required for reasonable and customary use in describing the
144
+ origin of the Work and reproducing the content of the NOTICE file.
145
+
146
+ 7. Disclaimer of Warranty. Unless required by applicable law or
147
+ agreed to in writing, Licensor provides the Work (and each
148
+ Contributor provides its Contributions) on an "AS IS" BASIS,
149
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
150
+ implied, including, without limitation, any warranties or conditions
151
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
152
+ PARTICULAR PURPOSE. You are solely responsible for determining the
153
+ appropriateness of using or redistributing the Work and assume any
154
+ risks associated with Your exercise of permissions under this License.
155
+
156
+ 8. Limitation of Liability. In no event and under no legal theory,
157
+ whether in tort (including negligence), contract, or otherwise,
158
+ unless required by applicable law (such as deliberate and grossly
159
+ negligent acts) or agreed to in writing, shall any Contributor be
160
+ liable to You for damages, including any direct, indirect, special,
161
+ incidental, or consequential damages of any character arising as a
162
+ result of this License or out of the use or inability to use the
163
+ Work (including but not limited to damages for loss of goodwill,
164
+ work stoppage, computer failure or malfunction, or any and all
165
+ other commercial damages or losses), even if such Contributor
166
+ has been advised of the possibility of such damages.
167
+
168
+ 9. Accepting Warranty or Additional Liability. While redistributing
169
+ the Work or Derivative Works thereof, You may choose to offer,
170
+ and charge a fee for, acceptance of support, warranty, indemnity,
171
+ or other liability obligations and/or rights consistent with this
172
+ License. However, in accepting such obligations, You may act only
173
+ on Your own behalf and on Your sole responsibility, not on behalf
174
+ of any other Contributor, and only if You agree to indemnify,
175
+ defend, and hold each Contributor harmless for any liability
176
+ incurred by, or claims asserted against, such Contributor by reason
177
+ of your accepting any such warranty or additional liability.
178
+
179
+ END OF TERMS AND CONDITIONS
180
+
181
+ APPENDIX: How to apply the Apache License to your work.
182
+
183
+ To apply the Apache License to your work, attach the following
184
+ boilerplate notice, with the fields enclosed by brackets "[]"
185
+ replaced with your own identifying information. (Don't include
186
+ the brackets!) The text should be enclosed in the appropriate
187
+ comment syntax for the file format. We also recommend that a
188
+ file or class name and description of purpose be included on the
189
+ same "printed page" as the copyright notice for easier
190
+ identification within third-party archives.
191
+
192
+ Copyright [yyyy] [name of copyright owner]
193
+
194
+ Licensed under the Apache License, Version 2.0 (the "License");
195
+ you may not use this file except in compliance with the License.
196
+ You may obtain a copy of the License at
197
+
198
+ http://www.apache.org/licenses/LICENSE-2.0
199
+
200
+ Unless required by applicable law or agreed to in writing, software
201
+ distributed under the License is distributed on an "AS IS" BASIS,
202
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
203
+ See the License for the specific language governing permissions and
204
+ limitations under the License.
package/NOTICE ADDED
@@ -0,0 +1,18 @@
1
+ Chutes Build
2
+ Copyright 2026 Michael Gasperini (Mikesoft)
3
+
4
+ This product is derived from xai-org/grok-build, originally distributed under
5
+ the Apache License, Version 2.0, and includes substantial modifications for the
6
+ Chutes ecosystem, including Chutes authentication and endpoints, model routing
7
+ and fallbacks, multimodal media tools, advisor and orchestration behavior,
8
+ Context7 integration, local memory, web/browser tools, privacy controls, and
9
+ Chutes Build branding.
10
+
11
+ The upstream copyright and attribution notices are retained in LICENSE and
12
+ THIRD-PARTY-NOTICES. Files changed from the upstream work carry their changes
13
+ through this repository's version-control history and this notice.
14
+
15
+ The native Chutes media subsystem incorporates the workflow and project-owned
16
+ implementation concepts from chutes-media-mcp, Copyright 2026 Michael Gasperini
17
+ (Mikesoft), originally available under the MIT License. The applicable MIT
18
+ license notice is preserved in this repository's third-party notices.
package/PRIVACY.md ADDED
@@ -0,0 +1,78 @@
1
+ # Privacy
2
+
3
+ Chutes Build is privacy-first: it collects no product analytics, emits no
4
+ telemetry, performs no remote error reporting, and does not upload traces or
5
+ sessions. There is no hidden opt-in or installation identifier.
6
+
7
+ ## Local data
8
+
9
+ The CLI may store configuration, an encrypted or OS-protected credential entry
10
+ where supported, sessions, logs, local exports, and user memory under
11
+ `~/.chutes-build` (or `CHUTES_BUILD_HOME`). Project memory is maintained in
12
+ `memories.md`. Known secret formats are filtered before memory writes, but users
13
+ should still avoid entering secrets into prompts.
14
+
15
+ `chutes-build trace` always creates a local archive. Remote session sharing and
16
+ upstream managed configuration commands are disabled. Automatic update checks
17
+ are disabled.
18
+
19
+ Sampling diagnostics are disabled by default. When explicitly enabled with
20
+ `--log-sampling` or `CHUTES_BUILD_LOG_SAMPLING=1`, the local
21
+ `logs/sampling.jsonl` file records operational metadata such as model, endpoint,
22
+ effort, token counts, errors, and SSE chunk byte lengths. It does not record
23
+ credential values or prefixes, request/response bodies, or normal SSE chunk
24
+ text. Provider-supplied error messages may still appear and should be reviewed
25
+ before sharing a diagnostic archive.
26
+
27
+ Prompt-efficiency debug events and the optional deterministic benchmark contain
28
+ only local numeric size estimates and built-in fixture data, never prompt or
29
+ source contents. Generated-media preview and audio playback stay local:
30
+ image/video decoding uses local image codecs and FFmpeg tools when installed,
31
+ and audio uses `ffplay` or the operating system's default player. Preview work
32
+ is bounded, off-thread, serialized, and deferred while inference is active. No
33
+ remote preview, thumbnail, codec, waveform, or playback service is used.
34
+
35
+ ## Outbound connections
36
+
37
+ Connections occur only when required by an explicit feature:
38
+
39
+ | Destination | Purpose | Data sent |
40
+ | --- | --- | --- |
41
+ | `model-router-ten.vercel.app` | default Chutes-compatible model routing | prompts, selected tool schemas, model responses, Chutes API credential |
42
+ | `llm.chutes.ai` | Chutes inference and model catalog | prompts/model requests and Chutes API credential |
43
+ | `api.chutes.ai` | Chutes account and media APIs | requested media parameters/assets and Chutes API credential |
44
+ | `chutes.ai/docs`, `chutes.ai/news` | mandatory primary-source verification for Chutes topics | requested official page URLs; no Chutes API credential |
45
+ | `context7.com` | current library documentation | library names and documentation queries; credentials and known secrets are rejected |
46
+ | DuckDuckGo or Brave Search | web search | search query; Brave receives only its dedicated key |
47
+ | User-selected web pages | web fetch/browser automation | normal HTTP/browser traffic required by the requested action |
48
+ | User-configured MCP servers/plugins | external tools | data required by the selected tool and its own configuration |
49
+
50
+ The Chutes API credential is accepted only for allowlisted Chutes and router
51
+ hosts. It is never reused for web search, Context7, arbitrary websites, MCP
52
+ servers, or browser automation.
53
+
54
+ For Chutes research, the agent prefers direct official pages and indexes over a
55
+ broad search query. Search and page requests must not include credentials,
56
+ private code, prompts, or repository content. If web access is disabled, the
57
+ agent reports that current official verification could not be completed.
58
+
59
+ ## Browser isolation
60
+
61
+ Agentic browser control launches a temporary Chrome/Edge profile and connects
62
+ through a loopback-only DevTools endpoint. It does not attach to the user's
63
+ normal browser profile. Sync and background network features are disabled.
64
+ Screenshots are restricted to the active workspace.
65
+
66
+ Browser actions can still disclose data to websites the user asks the agent to
67
+ visit. Review navigation, form submissions, uploads, and authenticated actions
68
+ before approval.
69
+
70
+ ## Disabling stateful features
71
+
72
+ - Start with `--no-memory` to disable agent memory for a session.
73
+ - Disable web search with `--disable-web-search`.
74
+ - Do not configure external MCP servers or plugins you do not trust.
75
+ - Set `CHUTES_STRICT_MODEL=1` to disable model fallback.
76
+
77
+ Privacy regressions are security issues and should be reported through the
78
+ private process in [SECURITY.md](SECURITY.md).
package/README.md ADDED
@@ -0,0 +1,246 @@
1
+ # Chutes Build
2
+
3
+ [![CI](https://github.com/TheStreamCode/chutes-build/actions/workflows/ci.yml/badge.svg)](https://github.com/TheStreamCode/chutes-build/actions/workflows/ci.yml)
4
+ [![npm version](https://img.shields.io/npm/v/chutes-build.svg)](https://www.npmjs.com/package/chutes-build)
5
+ [![License: Apache-2.0](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)
6
+
7
+ Chutes Build is a privacy-first, open-source coding agent optimized for the
8
+ [Chutes](https://chutes.ai) ecosystem. It combines an interactive terminal UI,
9
+ coding tools, model routing, parallel subagents, multimodal generation, web
10
+ research, browser automation, and local memory in one CLI.
11
+
12
+ ![Chutes Build terminal UI](assets/chutes/screenshot/chutes-build.png)
13
+
14
+ > **Development preview:** the project is under active development. Build it
15
+ > from source and review agent actions before approving changes.
16
+
17
+ ## What is included
18
+
19
+ - **Chutes-native inference:** API-key authentication, live model discovery,
20
+ `Auto (Chutes Router)` as the first model choice, configurable fallback
21
+ chains, and automatic retry when a selected model is temporarily unavailable.
22
+ - **Coding agent runtime:** repository inspection, edits, shell commands,
23
+ planning, goals, MCP servers, skills, sessions, worktrees, and permission
24
+ controls inherited from the mature upstream runtime.
25
+ - **Advisor:** a read-only, on-demand reasoning agent that reviews plans,
26
+ difficult decisions, blockers, and completion claims without taking over the
27
+ executor loop.
28
+ - **Subagent orchestration:** foreground and background workers, concurrent
29
+ fan-out, multi-worker waits, bounded nesting, and isolated worktrees. The
30
+ `chutes-build-orchestrator` preset is tuned for parallel decomposition.
31
+ - **Chutes account:** read-only subscription, quota, and usage access through
32
+ `get_chutes_usage`, a compact plan/quota indicator in the TUI, and detailed
33
+ `/usage` output. Per-model statistics remain disabled unless requested.
34
+ - **Chutes media:** live discovery and invocation for image generation and
35
+ editing, video, music, speech, and other supported Chutes media models through
36
+ `list_media_models`, `describe_media_model`, and `generate_media`. This is the
37
+ native Rust integration of the `chutes-media-mcp` workflow, so Chutes Build
38
+ does not need to spawn a separate Node/MCP process for its core media tools.
39
+ Generated output crosses the tool/ACP/TUI boundary as a typed artifact:
40
+ images use bounded lazy previews, videos use a two-frame rolling decoder,
41
+ and music/speech expose local pause/resume, seek, volume, duration, and
42
+ waveform controls with native-player fallback. Media work starts only while
43
+ inference is idle, never autoplays, and stays off the TUI render thread.
44
+ - **Capability routing:** image inputs stay with the selected model when it
45
+ supports vision and are otherwise delegated to a vision-capable Chutes route.
46
+ - **Current coding documentation:** Context7 search and documentation tools are
47
+ built in and avoid sending credentials or known secrets.
48
+ - **Official Chutes research:** before answering Chutes-specific questions, the
49
+ main agent and subagents consult both the official
50
+ [documentation](https://chutes.ai/docs) and [news](https://chutes.ai/news),
51
+ treating directly relevant official pages as primary authority.
52
+ - **Research and browser tools:** native web search (DuckDuckGo by default,
53
+ optionally Brave) plus agentic Chrome/Edge control through a local DevTools
54
+ connection and an isolated temporary browser profile.
55
+ - **Local memory:** Chutes Build maintains a secret-filtered `memories.md` file
56
+ and can be launched with `--no-memory` when a stateless session is preferred.
57
+ - **Time awareness and wellness:** the agent receives the local date, time, and
58
+ timezone and can suggest a break after long or late sessions.
59
+ - **Privacy by construction:** telemetry, remote error reporting, automatic
60
+ update checks, remote trace upload, and upstream session sharing are disabled.
61
+
62
+ ## Install with npm
63
+
64
+ Release builds install without a Rust toolchain:
65
+
66
+ ```powershell
67
+ npm install -g chutes-build
68
+ chutes-build
69
+ ```
70
+
71
+ For one-off use:
72
+
73
+ ```powershell
74
+ npx chutes-build
75
+ ```
76
+
77
+ The npm launcher selects a native binary for Windows, macOS, or Linux. It does
78
+ not collect telemetry and does not download executables from an install script.
79
+
80
+ ## Build from source
81
+
82
+ Prerequisites:
83
+
84
+ - Rust stable (`rustup` is recommended)
85
+ - Git
86
+ - a platform C/C++ build toolchain supported by Rust
87
+
88
+ Protocol Buffer tooling is vendored for normal builds; a separate `protoc`
89
+ installation is not required.
90
+
91
+ ```powershell
92
+ git clone https://github.com/TheStreamCode/chutes-build.git
93
+ cd chutes-build
94
+ cargo build -p chutes-build --release
95
+ ```
96
+
97
+ The Windows executable is `target\release\chutes-build.exe`; on macOS and
98
+ Linux it is `target/release/chutes-build`.
99
+
100
+ ## Quick start
101
+
102
+ Run `chutes-build` with no prior setup and log in from the welcome screen:
103
+ press `l` for "Login with Chutes" (opens your browser) or `k` to paste a
104
+ Chutes API key directly. `/login` reopens this choice at any time and
105
+ `/apikey` jumps straight to the API-key prompt.
106
+
107
+ To provide a key non-interactively instead, create one in Chutes and either
108
+ expose it only to the current process:
109
+
110
+ ```powershell
111
+ $env:CHUTES_API_KEY = "your-api-key"
112
+ chutes-build
113
+ ```
114
+
115
+ or store it using the hidden-input login flow:
116
+
117
+ ```powershell
118
+ chutes-build login
119
+ chutes-build
120
+ ```
121
+
122
+ `Auto (Chutes Router)` is the first entry in the model picker and the default
123
+ when no preference has been saved. Select a concrete model with `/model` or
124
+ `chutes-build --model <model-id>`. Inspect the resolved catalog with
125
+ `chutes-build models`.
126
+
127
+ ## Model selection, reasoning, and routing
128
+
129
+ Auto sends `model-router` requests to the Chutes router endpoint, allowing the
130
+ service to select a model for the task and handle cold or unavailable capacity.
131
+ A concrete model remains pinned unless a qualifying pre-stream failure advances
132
+ the explicit fallback chain.
133
+
134
+ Reasoning is model-specific. The model picker exposes only the controls
135
+ supported by the exact deployed generation: binary `Instant`/`Thinking` modes,
136
+ GLM-5.2's three modes, or no selector for fixed and non-reasoning models. Use
137
+ `/effort` interactively or `--effort <option-id>` in headless invocations. The
138
+ published model default is preserved unless the user explicitly changes it.
139
+
140
+ See [Model reasoning compatibility](docs/model-reasoning-compatibility.md) for
141
+ the current model matrix and forward-compatibility rules.
142
+
143
+ ```powershell
144
+ # Ordered comma-separated fallback chain. model-router is appended as the
145
+ # final Chutes fallback unless strict mode is enabled.
146
+ $env:CHUTES_FALLBACK_MODELS = "model-a,model-b"
147
+
148
+ # Never change the selected model automatically.
149
+ $env:CHUTES_STRICT_MODEL = "1"
150
+ ```
151
+
152
+ Fallback happens only for transient availability/capability responses and only
153
+ before response streaming begins. Chutes Build does not redirect requests or
154
+ credentials to a non-Chutes inference endpoint.
155
+
156
+ The inference client shares pooled HTTP connections, enables TCP no-delay, and
157
+ forwards parsed SSE events without an application-level streaming buffer. Cold
158
+ starts and model-side generation can still dominate latency. Auto is the
159
+ recommended default when a particular model is not required. The client does
160
+ not apply reduced-quality generation settings; target selection and quality
161
+ remain router decisions.
162
+ Selecting `Instant` can reduce reasoning latency, but it intentionally changes
163
+ the model's reasoning behavior and is never enabled silently.
164
+
165
+ ## Account plan and quota
166
+
167
+ When authenticated, Chutes Build fetches subscription usage, plan metadata, and
168
+ quota data concurrently. The TUI status bar shows the plan plus the rolling
169
+ four-hour and monthly percentages when available; its color follows the most
170
+ constrained active window and changes at 80% and 100%. Click the indicator or
171
+ run `/usage` for every active window, percentage, and reset time. If aggregate
172
+ quota usage is unavailable, the client falls back concurrently to the
173
+ documented per-chute quota endpoints.
174
+
175
+ ## Optional web and browser configuration
176
+
177
+ Web search uses DuckDuckGo without a dedicated key. For Brave Search:
178
+
179
+ ```powershell
180
+ $env:BRAVE_SEARCH_API_KEY = "your-brave-key"
181
+ $env:CHUTES_WEB_SEARCH_PROVIDER = "brave"
182
+ ```
183
+
184
+ Browser automation discovers Chrome or Edge automatically. Overrides:
185
+
186
+ ```powershell
187
+ $env:CHUTES_BROWSER_EXECUTABLE = "C:\Program Files\Google\Chrome\Application\chrome.exe"
188
+ $env:CHUTES_BROWSER_HEADFUL = "1" # optional; default is headless
189
+ ```
190
+
191
+ Browser screenshots may only be written inside the active workspace. The
192
+ automation profile is temporary, isolated from the user's normal browser
193
+ profile, and launched with sync and background-update features disabled.
194
+
195
+ Video attachments are sampled locally with FFmpeg and routed as representative
196
+ frames through the same Chutes vision path. Set `CHUTES_FFMPEG_EXECUTABLE` when
197
+ FFmpeg is not discoverable on `PATH`; restart Chutes Build after installing or
198
+ changing FFmpeg so the per-process capability cache is refreshed.
199
+
200
+ Media behavior can be tuned with the compatible `chutes-media-mcp` variables
201
+ `CHUTES_OUTPUT_DIR`, `CHUTES_WARMUP`, `CHUTES_COLD_START_RETRIES`,
202
+ `CHUTES_ALLOW_UNKNOWN_PARAMS`, and `CHUTES_PROVENANCE`. Downloaded media is
203
+ limited to 512 MiB by default (`CHUTES_MAX_MEDIA_BYTES`, hard ceiling 2 GiB),
204
+ while workspace inputs are limited to 64 MiB by default
205
+ (`CHUTES_MAX_INPUT_ASSET_BYTES`, hard ceiling 512 MiB).
206
+
207
+ ## Local data
208
+
209
+ User-level state defaults to `~/.chutes-build` or the directory set in
210
+ `CHUTES_BUILD_HOME`. Project memory is stored in `memories.md`. Configuration,
211
+ sessions, logs, exports, and credentials remain local unless a tool action
212
+ explicitly calls an external service.
213
+
214
+ See [PRIVACY.md](PRIVACY.md) for the exact network and data boundaries.
215
+
216
+ ## Security model
217
+
218
+ Chutes Build is an agent capable of reading files, running commands, editing
219
+ code, and controlling an isolated browser. Use it only in repositories you
220
+ trust, review proposed commands, and keep the default permission checks enabled
221
+ for sensitive work. Never place API keys in prompts, source files, or committed
222
+ configuration. See the [security review](docs/security-review.md) for release
223
+ controls, trust boundaries, and tracked dependency exceptions.
224
+
225
+ ## Project provenance
226
+
227
+ Chutes Build is a substantially modified fork of
228
+ [`xai-org/grok-build`](https://github.com/xai-org/grok-build). The upstream
229
+ project is licensed under Apache License 2.0; this fork retains the upstream
230
+ license and third-party notices.
231
+
232
+ See [NOTICE](NOTICE), [LICENSE](LICENSE), and
233
+ [THIRD-PARTY-NOTICES](THIRD-PARTY-NOTICES) for attribution.
234
+
235
+ New upstream releases and commits are detected by a read-only scheduled check
236
+ and reviewed through the documented [upstream synchronization
237
+ procedure](docs/upstream-sync.md); upstream changes are never merged or released
238
+ automatically.
239
+
240
+ ## Contributing
241
+
242
+ Issues and focused pull requests are welcome. Read
243
+ [CONTRIBUTING.md](CONTRIBUTING.md), [SECURITY.md](SECURITY.md), and
244
+ [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) before contributing.
245
+
246
+ Copyright 2026 Michael Gasperini (Mikesoft).
package/npm/README.md ADDED
@@ -0,0 +1,49 @@
1
+ # npm distribution
2
+
3
+ The public `chutes-build` package is a dependency-free Node.js launcher. Its
4
+ optional dependencies contain the native Rust executable for each supported
5
+ platform, so installation does not require Rust and does not download an
6
+ executable from a lifecycle script.
7
+
8
+ Supported release targets:
9
+
10
+ - Windows x64 and ARM64
11
+ - macOS x64 and ARM64
12
+ - Linux glibc x64 and ARM64
13
+
14
+ ## Prepare a platform package
15
+
16
+ Build the release executable for the target first, then stage its npm package:
17
+
18
+ ```powershell
19
+ node npm/scripts/prepare-platform-package.mjs --target win32-x64 --binary target/release/chutes-build.exe --out-dir target/npm
20
+ npm pack ./target/npm/chutes-build-win32-x64
21
+ ```
22
+
23
+ Valid target names are `win32-x64`, `win32-arm64`, `darwin-x64`,
24
+ `darwin-arm64`, `linux-x64-gnu`, and `linux-arm64-gnu`.
25
+
26
+ Publish all platform packages for a version before publishing the root
27
+ launcher. The version in `package.json` must match the Rust binary crate and
28
+ every platform package. Publishing is intentionally not performed by the build
29
+ or test scripts. Validate release metadata before packaging:
30
+
31
+ ```powershell
32
+ npm run verify:release
33
+ ```
34
+
35
+ The manual GitHub Actions workflow in `.github/workflows/package-release.yml`
36
+ builds all six native packages. Its publish input is disabled by default and
37
+ requires the protected `npm-release` environment when enabled. See
38
+ [`docs/releasing.md`](../docs/releasing.md) for the full release procedure.
39
+
40
+ ## Verify the launcher
41
+
42
+ The launcher accepts `CHUTES_BUILD_BINARY` as a local development override:
43
+
44
+ ```powershell
45
+ $env:CHUTES_BUILD_BINARY = (Resolve-Path target/debug/chutes-build.exe)
46
+ node npm/bin/chutes-build.js --help
47
+ npm test
48
+ npm pack --dry-run
49
+ ```
@@ -0,0 +1,80 @@
1
+ #!/usr/bin/env node
2
+
3
+ 'use strict';
4
+
5
+ const path = require('node:path');
6
+ const { spawnSync } = require('node:child_process');
7
+
8
+ const TARGETS = Object.freeze({
9
+ 'darwin-arm64': ['chutes-build-darwin-arm64', 'chutes-build'],
10
+ 'darwin-x64': ['chutes-build-darwin-x64', 'chutes-build'],
11
+ 'linux-arm64': ['chutes-build-linux-arm64-gnu', 'chutes-build'],
12
+ 'linux-x64': ['chutes-build-linux-x64-gnu', 'chutes-build'],
13
+ 'win32-arm64': ['chutes-build-win32-arm64', 'chutes-build.exe'],
14
+ 'win32-x64': ['chutes-build-win32-x64', 'chutes-build.exe']
15
+ });
16
+
17
+ function resolveBinary() {
18
+ const override = process.env.CHUTES_BUILD_BINARY;
19
+ if (override && override.trim()) {
20
+ return path.resolve(override.trim());
21
+ }
22
+
23
+ const target = `${process.platform}-${process.arch}`;
24
+ const descriptor = TARGETS[target];
25
+ if (!descriptor) {
26
+ throw new Error(
27
+ `Chutes Build does not provide a prebuilt binary for ${target}. ` +
28
+ `Supported targets: ${Object.keys(TARGETS).join(', ')}.`
29
+ );
30
+ }
31
+
32
+ const [packageName, executable] = descriptor;
33
+ try {
34
+ return require.resolve(`${packageName}/bin/${executable}`);
35
+ } catch (cause) {
36
+ const error = new Error(
37
+ `The optional package ${packageName} is missing. Reinstall without ` +
38
+ '`--omit=optional`, or install it explicitly with ' +
39
+ `\`npm install -g ${packageName}\`.`
40
+ );
41
+ error.cause = cause;
42
+ throw error;
43
+ }
44
+ }
45
+
46
+ function main() {
47
+ let binary;
48
+ try {
49
+ binary = resolveBinary();
50
+ } catch (error) {
51
+ console.error(`chutes-build: ${error.message}`);
52
+ process.exitCode = 1;
53
+ return;
54
+ }
55
+
56
+ const result = spawnSync(binary, process.argv.slice(2), {
57
+ stdio: 'inherit',
58
+ windowsHide: false
59
+ });
60
+
61
+ if (result.error) {
62
+ console.error(`chutes-build: failed to start ${binary}: ${result.error.message}`);
63
+ process.exitCode = 1;
64
+ return;
65
+ }
66
+
67
+ if (typeof result.status === 'number') {
68
+ process.exitCode = result.status;
69
+ return;
70
+ }
71
+
72
+ if (result.signal) {
73
+ process.kill(process.pid, result.signal);
74
+ return;
75
+ }
76
+
77
+ process.exitCode = 1;
78
+ }
79
+
80
+ main();
package/package.json ADDED
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "chutes-build",
3
+ "version": "0.1.0",
4
+ "description": "Privacy-first coding agent optimized for the Chutes ecosystem",
5
+ "license": "Apache-2.0",
6
+ "author": "Michael Gasperini (Mikesoft)",
7
+ "homepage": "https://github.com/TheStreamCode/chutes-build#readme",
8
+ "repository": {
9
+ "type": "git",
10
+ "url": "git+https://github.com/TheStreamCode/chutes-build.git"
11
+ },
12
+ "bugs": {
13
+ "url": "https://github.com/TheStreamCode/chutes-build/issues"
14
+ },
15
+ "publishConfig": {
16
+ "access": "public"
17
+ },
18
+ "type": "commonjs",
19
+ "bin": {
20
+ "chutes-build": "npm/bin/chutes-build.js"
21
+ },
22
+ "files": [
23
+ "npm/bin",
24
+ "README.md",
25
+ "LICENSE",
26
+ "NOTICE",
27
+ "PRIVACY.md"
28
+ ],
29
+ "engines": {
30
+ "node": ">=18"
31
+ },
32
+ "scripts": {
33
+ "test": "node --test npm/tests/*.test.cjs",
34
+ "verify:release": "node npm/scripts/verify-release.mjs"
35
+ },
36
+ "optionalDependencies": {
37
+ "chutes-build-darwin-arm64": "0.1.0",
38
+ "chutes-build-darwin-x64": "0.1.0",
39
+ "chutes-build-linux-arm64-gnu": "0.1.0",
40
+ "chutes-build-linux-x64-gnu": "0.1.0",
41
+ "chutes-build-win32-arm64": "0.1.0",
42
+ "chutes-build-win32-x64": "0.1.0"
43
+ },
44
+ "keywords": [
45
+ "ai",
46
+ "chutes",
47
+ "cli",
48
+ "coding-agent"
49
+ ]
50
+ }