brass-runtime 1.16.0 → 1.17.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/CHANGELOG.md +17 -0
- package/README.md +287 -23
- package/dist/agent/cli/main.cjs +38 -38
- package/dist/agent/cli/main.js +6 -6
- package/dist/agent/cli/main.mjs +6 -6
- package/dist/agent/index.cjs +7 -7
- package/dist/agent/index.d.ts +1 -1
- package/dist/agent/index.js +6 -6
- package/dist/agent/index.mjs +6 -6
- package/dist/chunk-2HQTDLHF.mjs +683 -0
- package/dist/chunk-36I3M4UC.mjs +370 -0
- package/dist/{chunk-QY5FKYEQ.js → chunk-3AYM6WPJ.js} +570 -51
- package/dist/chunk-3LOYJFRR.cjs +300 -0
- package/dist/chunk-3Y2RIUMM.js +300 -0
- package/dist/{chunk-7XOPAB5Q.js → chunk-4P2HHGAX.mjs} +83 -5
- package/dist/{chunk-N6VHMOWB.cjs → chunk-4ROBZFL6.cjs} +128 -128
- package/dist/{chunk-NC5SDRYE.js → chunk-52OB2ROS.js} +4 -4
- package/dist/{chunk-JX3LZQJH.cjs → chunk-52PPNNI4.cjs} +82 -20
- package/dist/{chunk-5YOQOXEQ.cjs → chunk-5EC274J5.cjs} +676 -293
- package/dist/chunk-5QC7LRZ3.js +229 -0
- package/dist/{chunk-7TL2LHQJ.js → chunk-5VRJNBLZ.mjs} +524 -141
- package/dist/chunk-62AZW6UT.cjs +313 -0
- package/dist/chunk-6IXXWIUM.js +683 -0
- package/dist/chunk-6RY2FFN4.mjs +2024 -0
- package/dist/chunk-74ZTY6CP.js +2871 -0
- package/dist/chunk-7CMJS3QE.mjs +2871 -0
- package/dist/{chunk-2WC63LJK.mjs → chunk-7JIJOVCT.js} +20 -10
- package/dist/chunk-7X3K5RMS.js +2024 -0
- package/dist/chunk-7ZPEZ57L.cjs +2024 -0
- package/dist/{chunk-FM4W4QPL.js → chunk-A2OM6NEH.mjs} +5 -4
- package/dist/chunk-AGR5B2BC.cjs +683 -0
- package/dist/chunk-B33ICAKP.js +313 -0
- package/dist/{chunk-J3H54ZRV.mjs → chunk-B5JD23U7.mjs} +1 -1
- package/dist/{chunk-F5EUMJL7.mjs → chunk-BKK77SBA.js} +83 -5
- package/dist/{chunk-U5KWK3PX.mjs → chunk-C3MDXTRZ.js} +11 -0
- package/dist/{chunk-SPUEME2B.cjs → chunk-CZIVE6NT.cjs} +12 -1
- package/dist/{chunk-TDVMADDN.js → chunk-DNFJLJMW.mjs} +11 -0
- package/dist/{chunk-XDZOO4L5.js → chunk-EJ6BPYVR.mjs} +79 -17
- package/dist/chunk-EOC4UHBS.mjs +229 -0
- package/dist/chunk-F6XWZQY4.cjs +777 -0
- package/dist/{chunk-7LVI2GIN.js → chunk-FH2X7BVP.js} +507 -72
- package/dist/{chunk-OOGJ73B6.js → chunk-FHQGHPMO.mjs} +20 -10
- package/dist/{chunk-WQ5QNU5R.cjs → chunk-GLE2WY7Z.cjs} +652 -217
- package/dist/{chunk-G6IQOE4P.mjs → chunk-GYM3LLGS.mjs} +507 -72
- package/dist/{chunk-TVN5I4U6.cjs → chunk-JF5WGYJJ.cjs} +25 -24
- package/dist/{chunk-CY33PGEX.mjs → chunk-KH4SYAOS.mjs} +570 -51
- package/dist/chunk-KN32XNTH.mjs +313 -0
- package/dist/chunk-KQLYONSE.cjs +2871 -0
- package/dist/{chunk-7HUOJA4W.cjs → chunk-KZJQ723N.cjs} +90 -80
- package/dist/{chunk-CCKHV5BT.mjs → chunk-L2SYFEBS.js} +5 -4
- package/dist/{chunk-IJT6RRQ5.cjs → chunk-L6VB5N7Q.cjs} +20 -9
- package/dist/{chunk-ZGLD4TVZ.mjs → chunk-MBEJI5HF.mjs} +4 -4
- package/dist/{chunk-PRWCB3QL.mjs → chunk-MIIYDLGM.js} +524 -141
- package/dist/{chunk-H55LI6WY.js → chunk-MOO4L7F4.mjs} +15 -4
- package/dist/chunk-MVGUEJ5Z.cjs +370 -0
- package/dist/chunk-PD4EJTQC.cjs +229 -0
- package/dist/chunk-PWC3RBQE.mjs +300 -0
- package/dist/{chunk-MWXMNYJS.cjs → chunk-Q2I37RP3.cjs} +643 -124
- package/dist/{chunk-VFIUZG7J.mjs → chunk-RKGKFN2A.js} +79 -17
- package/dist/{chunk-NYL4D7SK.cjs → chunk-SA6HUJVI.cjs} +5 -5
- package/dist/chunk-SK7UZRNI.mjs +777 -0
- package/dist/{chunk-K2T3DV26.mjs → chunk-TRM4JUZQ.js} +15 -4
- package/dist/chunk-UB4B6OFY.js +370 -0
- package/dist/{chunk-G3XGCZDQ.js → chunk-UCUBNWM2.js} +1 -1
- package/dist/chunk-VWIPB6I5.js +777 -0
- package/dist/{chunk-JNFRRJYH.cjs → chunk-WBGRHGBP.cjs} +270 -192
- package/dist/{client-CtFmoDvM.d.ts → client-CZHU674n.d.ts} +211 -36
- package/dist/core/index.cjs +135 -9
- package/dist/core/index.d.ts +238 -33
- package/dist/core/index.js +155 -29
- package/dist/core/index.mjs +155 -29
- package/dist/{effect-CGNl5Rqp.d.ts → effect-DIUHZ9IN.d.ts} +89 -1
- package/dist/effectRunner-CFLC32IK.cjs +8 -0
- package/dist/{effectRunner-A4CHJXJI.js → effectRunner-L4S7IPT3.js} +2 -2
- package/dist/{effectRunner-OPUF6QRN.mjs → effectRunner-NNGG75QA.mjs} +2 -2
- package/dist/http/index.cjs +324 -2986
- package/dist/http/index.d.ts +54 -68
- package/dist/http/index.js +238 -2900
- package/dist/http/index.mjs +238 -2900
- package/dist/http/testing.cjs +14 -12
- package/dist/http/testing.d.ts +5 -4
- package/dist/http/testing.js +10 -8
- package/dist/http/testing.mjs +10 -8
- package/dist/index.cjs +423 -255
- package/dist/index.d.ts +87 -69
- package/dist/index.js +301 -133
- package/dist/index.mjs +301 -133
- package/dist/observability/index.cjs +18 -531
- package/dist/observability/index.d.ts +81 -8
- package/dist/observability/index.js +25 -538
- package/dist/observability/index.mjs +25 -538
- package/dist/perf/cli.cjs +401 -0
- package/dist/perf/cli.d.ts +1 -0
- package/dist/perf/cli.js +401 -0
- package/dist/perf/cli.mjs +401 -0
- package/dist/perf/index.cjs +141 -0
- package/dist/perf/index.d.ts +483 -0
- package/dist/perf/index.js +141 -0
- package/dist/perf/index.mjs +141 -0
- package/dist/schedule-CK3Ml_7p.d.ts +259 -0
- package/dist/schema/index.cjs +6 -2
- package/dist/schema/index.d.ts +3 -1
- package/dist/schema/index.js +5 -1
- package/dist/schema/index.mjs +5 -1
- package/dist/{server-C8hDXA74.d.ts → server-D6JZ15_e.d.ts} +16 -4
- package/dist/{stream-dvSs0QS5.d.ts → stream-B4oK9JFP.d.ts} +1 -1
- package/dist/{tracer-B5tRH9H7.d.ts → tracer-Hwt1cl7h.d.ts} +13 -54
- package/dist/{tracing-Dt9S_6V8.d.ts → tracing-DqbTKGcf.d.ts} +1 -1
- package/docs/ARCHITECTURE.md +292 -0
- package/docs/README.md +65 -0
- package/docs/adr/0001-ai-context-pack.md +32 -0
- package/docs/agent-apply-mode.md +104 -0
- package/docs/agent-approvals.md +110 -0
- package/docs/agent-batch.md +185 -0
- package/docs/agent-boundaries.md +112 -0
- package/docs/agent-chat-sessions.md +160 -0
- package/docs/agent-ci.md +17 -0
- package/docs/agent-cli.md +405 -0
- package/docs/agent-config.md +480 -0
- package/docs/agent-context-discovery.md +159 -0
- package/docs/agent-copilot-like-dx.md +126 -0
- package/docs/agent-declarative-optimized-planning.md +138 -0
- package/docs/agent-dx.md +224 -0
- package/docs/agent-env-files.md +126 -0
- package/docs/agent-follow-up-context.md +43 -0
- package/docs/agent-global-usage.md +180 -0
- package/docs/agent-init.md +109 -0
- package/docs/agent-install-and-configure.md +516 -0
- package/docs/agent-language-workspace-ux.md +99 -0
- package/docs/agent-llm-adapters.md +123 -0
- package/docs/agent-local-install.md +190 -0
- package/docs/agent-local-tests.md +51 -0
- package/docs/agent-observability.md +155 -0
- package/docs/agent-patch-quality-loop.md +162 -0
- package/docs/agent-presets.md +22 -0
- package/docs/agent-project-commands.md +237 -0
- package/docs/agent-project-intelligence.md +156 -0
- package/docs/agent-redaction.md +18 -0
- package/docs/agent-release-readiness.md +76 -0
- package/docs/agent-rollback-safety.md +162 -0
- package/docs/agent-rollback.md +23 -0
- package/docs/agent-run-artifacts.md +16 -0
- package/docs/agent-vscode-auto-discovery.md +137 -0
- package/docs/agent-vscode-batch-runner.md +100 -0
- package/docs/agent-vscode-chat-layout.md +90 -0
- package/docs/agent-vscode-clean-install.md +147 -0
- package/docs/agent-vscode-code-actions.md +70 -0
- package/docs/agent-vscode-diff-preview.md +45 -0
- package/docs/agent-vscode-inline-assist.md +56 -0
- package/docs/agent-vscode-install.md +186 -0
- package/docs/agent-vscode-model-setup.md +97 -0
- package/docs/agent-vscode-patch-preview.md +92 -0
- package/docs/agent-vscode-problems.md +79 -0
- package/docs/agent-vscode-project-dashboard.md +106 -0
- package/docs/agent-vscode-run-history.md +92 -0
- package/docs/agent-vscode-ux.md +73 -0
- package/docs/ai/INVARIANTS.md +84 -0
- package/docs/ai/PROJECT_MAP.md +338 -0
- package/docs/ai/PUBLIC_API.md +339 -0
- package/docs/ai/VALIDATION_MATRIX.md +67 -0
- package/docs/api-polish.md +37 -0
- package/docs/cancellation.md +162 -0
- package/docs/coverage.md +46 -0
- package/docs/framework-integrations.md +38 -0
- package/docs/frameworks/angular.md +153 -0
- package/docs/frameworks/express.md +125 -0
- package/docs/frameworks/fastify.md +124 -0
- package/docs/frameworks/nestjs.md +282 -0
- package/docs/frameworks/nextjs.md +147 -0
- package/docs/frameworks/react.md +139 -0
- package/docs/frameworks/vanilla.md +224 -0
- package/docs/getting-started.md +159 -0
- package/docs/guides/README.md +40 -0
- package/docs/guides/circuit-breaker.md +89 -0
- package/docs/guides/error-handling.md +91 -0
- package/docs/guides/getting-started.md +107 -0
- package/docs/guides/layers.md +189 -0
- package/docs/guides/metrics.md +101 -0
- package/docs/guides/resource-management.md +141 -0
- package/docs/guides/retry.md +215 -0
- package/docs/guides/semaphore.md +66 -0
- package/docs/guides/streams.md +117 -0
- package/docs/guides/supervisors.md +98 -0
- package/docs/guides/testing.md +162 -0
- package/docs/guides/tracing.md +71 -0
- package/docs/http-recipes.md +399 -0
- package/docs/http.md +749 -0
- package/docs/modules.md +285 -0
- package/docs/nestjs.md +6 -0
- package/docs/observability-collector-smoke.md +31 -0
- package/docs/observability-framework-examples.md +110 -0
- package/docs/observability.md +649 -0
- package/docs/otel-collector-smoke.yaml +27 -0
- package/docs/performance-profiler.md +199 -0
- package/docs/production-readiness.md +73 -0
- package/docs/recipes/README.md +12 -0
- package/docs/recipes/http-server.md +45 -0
- package/docs/recipes/layers.md +44 -0
- package/docs/recipes/performance.md +47 -0
- package/docs/recipes/runtime.md +41 -0
- package/docs/recipes/testing.md +41 -0
- package/docs/release.md +53 -0
- package/docs/wasm-bounded-queues.md +44 -0
- package/docs/wasm-engine-observability-benchmarks.md +85 -0
- package/docs/wasm-fiber-engine.md +117 -0
- package/docs/wasm-scheduler-state-machine.md +122 -0
- package/docs/wasm-stream-chunks.md +54 -0
- package/package.json +22 -2
- package/dist/chunk-45F7OKGT.cjs +0 -104
- package/dist/chunk-7V4KY4RL.mjs +0 -104
- package/dist/chunk-DJQ7OMMB.cjs +0 -144
- package/dist/chunk-GOV47PPB.mjs +0 -552
- package/dist/chunk-JF4XXPZ5.cjs +0 -552
- package/dist/chunk-KCPT2D6G.js +0 -552
- package/dist/chunk-NOYZIMUJ.mjs +0 -144
- package/dist/chunk-PNVFW245.js +0 -144
- package/dist/chunk-ROJC3NBJ.js +0 -104
- package/dist/effectRunner-3ZHAD3LE.cjs +0 -8
- package/dist/schedule-Fque9Abz.d.ts +0 -70
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
# Brass Agent global usage and workspace discovery
|
|
2
|
+
|
|
3
|
+
`brass-agent` is meant to run from **any project**, not only from the `brass-runtime` checkout.
|
|
4
|
+
|
|
5
|
+
The runtime checkout is where the CLI is built. The workspace is whichever project you run the CLI against.
|
|
6
|
+
|
|
7
|
+
```txt
|
|
8
|
+
brass-runtime checkout
|
|
9
|
+
-> builds/installs brass-agent
|
|
10
|
+
|
|
11
|
+
any other project
|
|
12
|
+
-> run brass-agent here
|
|
13
|
+
-> agent discovers that project as the workspace
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Install the CLI globally for local development
|
|
17
|
+
|
|
18
|
+
From the `brass-runtime` checkout:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npm run agent:link
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
This runs:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npm run build
|
|
28
|
+
npm link
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
After that, `brass-agent` should be available on your `PATH` from any folder:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
brass-agent --where
|
|
35
|
+
brass-agent --doctor
|
|
36
|
+
brass-agent --preset inspect
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
To remove the global CLI link/install:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
npm run agent:unlink
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
This command is idempotent: it is okay if the package is not currently linked or installed globally.
|
|
46
|
+
|
|
47
|
+
## Use it in another project
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
cd /path/to/another-project
|
|
51
|
+
brass-agent --where
|
|
52
|
+
brass-agent --init --init-profile google
|
|
53
|
+
brass-agent --doctor
|
|
54
|
+
brass-agent --preset inspect
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
`--where` prints the workspace root the agent will use.
|
|
58
|
+
|
|
59
|
+
## Workspace auto-discovery
|
|
60
|
+
|
|
61
|
+
By default, `brass-agent` treats `--cwd` as a **starting directory**, not necessarily the final workspace root.
|
|
62
|
+
|
|
63
|
+
It searches upward for the nearest workspace marker:
|
|
64
|
+
|
|
65
|
+
```txt
|
|
66
|
+
.brass-agent.json
|
|
67
|
+
brass-agent.config.json
|
|
68
|
+
package.json
|
|
69
|
+
pnpm-workspace.yaml
|
|
70
|
+
turbo.json
|
|
71
|
+
nx.json
|
|
72
|
+
.git
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Examples:
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
cd /repo/packages/api/src/routes
|
|
79
|
+
brass-agent --where
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
May resolve to:
|
|
83
|
+
|
|
84
|
+
```txt
|
|
85
|
+
workspace: /repo/packages/api
|
|
86
|
+
marker: package.json
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Then config discovery, env-file loading, package-manager detection, validation commands, context discovery, and patch application all use that resolved workspace.
|
|
90
|
+
|
|
91
|
+
## Disable workspace discovery
|
|
92
|
+
|
|
93
|
+
If you intentionally want the exact current folder:
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
brass-agent --no-discover-workspace --where
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
or:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
brass-agent --no-discover-workspace --cwd ./some/subdir "inspect this folder"
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
## VS Code with a global CLI
|
|
106
|
+
|
|
107
|
+
If the CLI is globally linked, the VS Code extension can just use:
|
|
108
|
+
|
|
109
|
+
```json
|
|
110
|
+
{
|
|
111
|
+
"brassAgent.command": "brass-agent"
|
|
112
|
+
}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
To install the extension and write that setting into the current workspace:
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
npm run agent:vscode:install:global
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
That script now links the CLI globally first, then installs the VS Code extension with `brassAgent.command = "brass-agent"`.
|
|
122
|
+
|
|
123
|
+
To remove the global VS Code setup and the global CLI link/install:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
npm run agent:vscode:uninstall:global
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
To force a full clean global reinstall:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
npm run agent:vscode:reinstall:global
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
For a different workspace:
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
node scripts/install-vscode-extension.mjs \
|
|
139
|
+
--use-global-command \
|
|
140
|
+
--workspace /path/to/another-project
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
This is the best setup when you want one local Brass Agent installation and many workspaces.
|
|
144
|
+
|
|
145
|
+
## Absolute local CLI path
|
|
146
|
+
|
|
147
|
+
For development of the agent itself, the installer may write an absolute command:
|
|
148
|
+
|
|
149
|
+
```json
|
|
150
|
+
{
|
|
151
|
+
"brassAgent.command": "/path/to/brass-runtime/dist/agent/cli/main.cjs"
|
|
152
|
+
}
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
That works too, but it is less portable than `brass-agent`.
|
|
156
|
+
|
|
157
|
+
## Recommended daily workflow
|
|
158
|
+
|
|
159
|
+
Once globally linked:
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
cd /path/to/project
|
|
163
|
+
brass-agent --where
|
|
164
|
+
brass-agent --doctor
|
|
165
|
+
brass-agent --preset inspect
|
|
166
|
+
brass-agent --preset typecheck
|
|
167
|
+
brass-agent "fix the failing tests"
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
From VS Code:
|
|
171
|
+
|
|
172
|
+
```txt
|
|
173
|
+
Brass Agent -> Chat -> /inspect
|
|
174
|
+
Brass Agent -> Chat -> /fix-tests
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
## VS Code auto-discovery
|
|
179
|
+
|
|
180
|
+
The VS Code extension can now use `brassAgent.command = "auto"` and prefer its bundled CLI, so you can open any repo and use Brass Agent without linking the CLI globally. See [VS Code auto-discovery](./agent-vscode-auto-discovery.md).
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# Brass Agent init
|
|
2
|
+
|
|
3
|
+
> For the end-to-end setup flow, see [Brass Agent install and configure](./agent-install-and-configure.md).
|
|
4
|
+
|
|
5
|
+
`brass-agent --init` bootstraps a workspace for local Brass Agent usage without adding CI or release automation.
|
|
6
|
+
|
|
7
|
+
It creates these files in `--cwd`:
|
|
8
|
+
|
|
9
|
+
- `.brass-agent.json` — project-local policy/config.
|
|
10
|
+
- `brass-agent.batch.json` — sample multi-goal workflow for `--batch-file`.
|
|
11
|
+
- `.env.example` — example LLM environment variables; real secrets must stay outside git.
|
|
12
|
+
- `BRASS_AGENT.md` — short local usage note for the repository.
|
|
13
|
+
|
|
14
|
+
The command never writes real secrets and does not overwrite existing files unless `--force` or `--init-force` is passed.
|
|
15
|
+
|
|
16
|
+
## Basic usage
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
brass-agent --init
|
|
20
|
+
brass-agent --doctor
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
For development from the repository:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npm run agent:init
|
|
27
|
+
npm run agent:init:dry-run
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Initialize a different workspace:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
brass-agent --init --cwd ../my-project
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Preview without writing:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
brass-agent --init --init-dry-run
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Overwrite previously generated files:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
brass-agent --init --force
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Profiles
|
|
49
|
+
|
|
50
|
+
`--init-profile` selects how much LLM config is written.
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
brass-agent --init --init-profile default
|
|
54
|
+
brass-agent --init --init-profile google
|
|
55
|
+
brass-agent --init --init-profile openai-compatible
|
|
56
|
+
brass-agent --init --init-profile fake
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Profiles:
|
|
60
|
+
|
|
61
|
+
- `default` leaves `config.llm` unset, so the CLI keeps its normal provider auto-detection and can fall back to fake mode.
|
|
62
|
+
- `google` writes Gemini config using `GEMINI_API_KEY` and `gemini-2.5-flash`.
|
|
63
|
+
- `openai-compatible` writes `/chat/completions` config using `BRASS_LLM_API_KEY` and `BRASS_LLM_ENDPOINT`.
|
|
64
|
+
- `fake` writes an offline fake provider config for smoke tests.
|
|
65
|
+
|
|
66
|
+
`--init-provider` is an alias for provider-oriented profiles:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
brass-agent --init --init-provider google
|
|
70
|
+
brass-agent --init --init-provider auto
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
`auto` maps to the `default` profile.
|
|
74
|
+
|
|
75
|
+
## Generated config shape
|
|
76
|
+
|
|
77
|
+
The generated `.brass-agent.json` is intentionally conservative:
|
|
78
|
+
|
|
79
|
+
- default mode is `propose`;
|
|
80
|
+
- approval mode is `auto`;
|
|
81
|
+
- patch apply requires approval;
|
|
82
|
+
- redaction is enabled;
|
|
83
|
+
- context discovery excludes `.env*`, private keys, `node_modules`, build outputs, and `secrets/**`;
|
|
84
|
+
- rollback safety is enabled for generated patches;
|
|
85
|
+
- shell permissions inherit the built-in validation allowlist and explicitly deny dangerous commands like `rm *`, `git push *`, `git reset *`, and `git clean *`.
|
|
86
|
+
|
|
87
|
+
The initializer also inspects `package.json` when present:
|
|
88
|
+
|
|
89
|
+
- package manager is inferred from `packageManager` or lockfiles;
|
|
90
|
+
- `includeTypecheck` is enabled only when common typecheck scripts exist;
|
|
91
|
+
- `includeLint` is enabled only when common lint scripts exist;
|
|
92
|
+
- the sample batch file includes only presets that make sense for the scripts it finds.
|
|
93
|
+
|
|
94
|
+
## Recommended flow
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
brass-agent --init
|
|
98
|
+
brass-agent --doctor
|
|
99
|
+
brass-agent --preset inspect
|
|
100
|
+
brass-agent --batch-file brass-agent.batch.json
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
For VS Code, run the local installer after init:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
npm run agent:vscode:install
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
or install the `.vsix` manually from `extensions/vscode-brass-agent`.
|