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,186 @@
|
|
|
1
|
+
# Installing the VS Code extension locally
|
|
2
|
+
|
|
3
|
+
> For the end-to-end setup flow, see [Brass Agent install and configure](./agent-install-and-configure.md).
|
|
4
|
+
|
|
5
|
+
The easiest local path for developing inside the `brass-runtime` checkout is:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm run agent:vscode:install
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
That builds the CLI, packages the VSIX, installs it into VS Code, and writes a local `.vscode/settings.json` pointing `brassAgent.command` at `dist/agent/cli/main.cjs`.
|
|
12
|
+
|
|
13
|
+
If you want to use the same agent from many projects, prefer the global-command flow:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm run agent:vscode:install:global
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
That command links the CLI globally and installs the extension configured to call `brass-agent`. It writes:
|
|
20
|
+
|
|
21
|
+
```json
|
|
22
|
+
{
|
|
23
|
+
"brassAgent.command": "brass-agent"
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
To remove that global setup:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npm run agent:vscode:uninstall:global
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
See [Agent global usage and workspace discovery](./agent-global-usage.md) and [Agent local install and doctor](./agent-local-install.md) for details.
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
The VS Code extension is designed to be installed as a `.vsix` while the project
|
|
37
|
+
is still pre-marketplace.
|
|
38
|
+
|
|
39
|
+
## Build the CLI first
|
|
40
|
+
|
|
41
|
+
From the repository root:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npm install
|
|
45
|
+
npm run build
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
This should produce the CLI entrypoint used by the extension:
|
|
49
|
+
|
|
50
|
+
```txt
|
|
51
|
+
dist/agent/cli/main.cjs
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
You can either put the `brass-agent` binary on PATH, or configure the extension
|
|
55
|
+
to call this file directly.
|
|
56
|
+
|
|
57
|
+
## Package the extension
|
|
58
|
+
|
|
59
|
+
From the extension folder:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
cd extensions/vscode-brass-agent
|
|
63
|
+
npm install
|
|
64
|
+
npm run compile
|
|
65
|
+
npm run package:vsix
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
This creates a file like:
|
|
69
|
+
|
|
70
|
+
```txt
|
|
71
|
+
vscode-brass-agent-0.0.1.vsix
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
The extension manifest includes `repository`, `homepage`, and `bugs` metadata so
|
|
75
|
+
`vsce` can package it without the missing-repository warning. If you publish from
|
|
76
|
+
a fork, update those fields in `extensions/vscode-brass-agent/package.json` first.
|
|
77
|
+
|
|
78
|
+
## Install in VS Code
|
|
79
|
+
|
|
80
|
+
Using the command line:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
code --install-extension vscode-brass-agent-0.0.1.vsix
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Or from VS Code:
|
|
87
|
+
|
|
88
|
+
```txt
|
|
89
|
+
Extensions view
|
|
90
|
+
-> Views and More Actions...
|
|
91
|
+
-> Install from VSIX...
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Configure the CLI path
|
|
95
|
+
|
|
96
|
+
For local development, point the extension to the built CLI:
|
|
97
|
+
|
|
98
|
+
```json
|
|
99
|
+
{
|
|
100
|
+
"brassAgent.command": "/absolute/path/to/brass-runtime/dist/agent/cli/main.cjs"
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
For a globally installed package, keep the default:
|
|
105
|
+
|
|
106
|
+
```json
|
|
107
|
+
{
|
|
108
|
+
"brassAgent.command": "brass-agent"
|
|
109
|
+
}
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
## If the UI is missing or stale
|
|
114
|
+
|
|
115
|
+
After installing, run:
|
|
116
|
+
|
|
117
|
+
```txt
|
|
118
|
+
Developer: Reload Window
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Then open the Brass Agent activity-bar icon. You should see:
|
|
122
|
+
|
|
123
|
+
```txt
|
|
124
|
+
Chat
|
|
125
|
+
Run History
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
If you only see `Run History`, or the toolbar looks like an older build, run:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
npm run agent:vscode:reinstall
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
See [VS Code full clean and reinstall](./agent-vscode-clean-install.md).
|
|
135
|
+
|
|
136
|
+
## Doctor
|
|
137
|
+
|
|
138
|
+
After installing, run:
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
npm run agent:doctor
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
or from the VS Code command palette:
|
|
145
|
+
|
|
146
|
+
```txt
|
|
147
|
+
Brass Agent: Doctor
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## Notes
|
|
151
|
+
|
|
152
|
+
The VS Code extension is a client for the CLI. Installing the extension alone is
|
|
153
|
+
not enough unless `brass-agent` is also available to the editor process.
|
|
154
|
+
|
|
155
|
+
## Initialize a workspace first
|
|
156
|
+
|
|
157
|
+
For a new project, bootstrap local config before deeper DX setup:
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
brass-agent --init
|
|
161
|
+
brass-agent --doctor
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
The VS Code extension also contributes `Brass Agent: Initialize Workspace`, which runs the same init flow from the command palette.
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
## VS Code auto-discovery
|
|
168
|
+
|
|
169
|
+
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).
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
## Configure the model from VS Code
|
|
173
|
+
|
|
174
|
+
After installing the extension, run `Brass Agent: Configure Model` or `/model` from the Chat view. API keys are stored in VS Code Secret Storage and injected into VS Code-launched agent runs. See [VS Code model setup](./agent-vscode-model-setup.md).
|
|
175
|
+
|
|
176
|
+
## Node used by the bundled CLI
|
|
177
|
+
|
|
178
|
+
When the extension uses its bundled CLI, it launches `main.cjs` with `node` by default. If your Node executable has a custom path, set:
|
|
179
|
+
|
|
180
|
+
```json
|
|
181
|
+
{
|
|
182
|
+
"brassAgent.nodeCommand": "/absolute/path/to/node"
|
|
183
|
+
}
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
If `node` cannot be found, the extension falls back to VS Code Electron-as-Node automatically.
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Brass Agent VS Code model setup
|
|
2
|
+
|
|
3
|
+
The VS Code extension can configure the model used by `brass-agent` without requiring a terminal or a repository-local `.env` file.
|
|
4
|
+
|
|
5
|
+
## Why configure from VS Code?
|
|
6
|
+
|
|
7
|
+
When the extension launches the bundled `brass-agent` CLI, it can inject provider environment variables into that child process. This means you can open any workspace and use the Brass Agent Chat without first exporting keys in your shell.
|
|
8
|
+
|
|
9
|
+
Secrets are stored with VS Code Secret Storage, not in `.brass-agent.json`, `.env`, `settings.json`, or source control. VS Code exposes `ExtensionContext.secrets` for sensitive information; the implementation stores secrets encrypted and does not sync them across machines. [VS Code docs](https://code.visualstudio.com/api/extension-capabilities/common-capabilities)
|
|
10
|
+
|
|
11
|
+
## First run
|
|
12
|
+
|
|
13
|
+
Open the Brass Agent sidebar and run:
|
|
14
|
+
|
|
15
|
+
```txt
|
|
16
|
+
Brass Agent: Configure Model
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Or from the Chat view:
|
|
20
|
+
|
|
21
|
+
```txt
|
|
22
|
+
/model
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
You can choose:
|
|
26
|
+
|
|
27
|
+
- **Google / Gemini** — stores a Gemini API key and model name.
|
|
28
|
+
- **OpenAI-compatible** — stores an API key plus endpoint/model settings.
|
|
29
|
+
- **Fake / offline** — no API key; useful for smoke tests and UI testing.
|
|
30
|
+
- **Auto-detect** — lets workspace config/env decide, while still injecting stored VS Code secrets when available.
|
|
31
|
+
|
|
32
|
+
## Google / Gemini
|
|
33
|
+
|
|
34
|
+
The extension stores the key in VS Code Secret Storage and passes these variables only to runs launched from VS Code:
|
|
35
|
+
|
|
36
|
+
```txt
|
|
37
|
+
BRASS_LLM_PROVIDER=google
|
|
38
|
+
GEMINI_API_KEY=<secret>
|
|
39
|
+
GOOGLE_API_KEY=<secret>
|
|
40
|
+
BRASS_GOOGLE_API_KEY=<secret>
|
|
41
|
+
BRASS_GOOGLE_MODEL=gemini-2.5-flash
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
The key value is not printed in Doctor output and is not written to the workspace.
|
|
45
|
+
|
|
46
|
+
## OpenAI-compatible
|
|
47
|
+
|
|
48
|
+
For OpenAI-compatible providers, the extension passes:
|
|
49
|
+
|
|
50
|
+
```txt
|
|
51
|
+
BRASS_LLM_PROVIDER=openai-compatible
|
|
52
|
+
BRASS_LLM_ENDPOINT=https://api.openai.com/v1/chat/completions
|
|
53
|
+
BRASS_LLM_API_KEY=<secret>
|
|
54
|
+
BRASS_LLM_MODEL=gpt-4.1
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Use a custom endpoint/model when configuring the provider.
|
|
58
|
+
|
|
59
|
+
## Doctor
|
|
60
|
+
|
|
61
|
+
After setup, run:
|
|
62
|
+
|
|
63
|
+
```txt
|
|
64
|
+
Brass Agent: Doctor
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
or in Chat:
|
|
68
|
+
|
|
69
|
+
```txt
|
|
70
|
+
/doctor
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Doctor runs through the extension, so it can see secrets stored by the extension. A terminal command like `brass-agent --doctor` will not see VS Code Secret Storage unless the same key is also exported in your shell or configured via `.env`.
|
|
74
|
+
|
|
75
|
+
## Clearing stored keys
|
|
76
|
+
|
|
77
|
+
Run:
|
|
78
|
+
|
|
79
|
+
```txt
|
|
80
|
+
Brass Agent: Configure Model
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
and choose:
|
|
84
|
+
|
|
85
|
+
```txt
|
|
86
|
+
Clear stored model secrets
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
This deletes the keys stored by the Brass Agent extension.
|
|
90
|
+
|
|
91
|
+
## Recommended daily flow
|
|
92
|
+
|
|
93
|
+
1. Install/reinstall the extension.
|
|
94
|
+
2. Open any repository in VS Code.
|
|
95
|
+
3. Run `Brass Agent: Configure Model` once.
|
|
96
|
+
4. Run `Brass Agent: Doctor`.
|
|
97
|
+
5. Use `Brass Agent → Chat` with `/inspect`, `/fix-tests`, `/fix-problems`, or natural language.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Brass Agent VS Code patch preview
|
|
2
|
+
|
|
3
|
+
P10 adds the first editor-native write flow for Brass Agent.
|
|
4
|
+
|
|
5
|
+
The VS Code extension remains a thin client over the CLI. It does not apply
|
|
6
|
+
patches directly and does not duplicate agent semantics.
|
|
7
|
+
|
|
8
|
+
```txt
|
|
9
|
+
VS Code command
|
|
10
|
+
-> brass-agent --protocol-json --protocol-full-patches --mode propose
|
|
11
|
+
-> patch.proposed observation
|
|
12
|
+
-> VS Code Webview preview
|
|
13
|
+
-> user clicks Apply Patch
|
|
14
|
+
-> brass-agent --apply-patch-file <temp.diff> --yes
|
|
15
|
+
-> PatchService / permissions / validation stay in src/agent
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Why two runs?
|
|
19
|
+
|
|
20
|
+
The extension first asks the agent to propose a patch. The proposed unified diff
|
|
21
|
+
is shown in a webview. If the user approves that exact diff, the extension writes
|
|
22
|
+
it to a temporary file and asks the CLI to apply that file.
|
|
23
|
+
|
|
24
|
+
This avoids the unsafe UX of previewing one patch and then asking the LLM to
|
|
25
|
+
regenerate a possibly different patch during apply.
|
|
26
|
+
|
|
27
|
+
## CLI flags added for editor clients
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
brass-agent --protocol-json --protocol-full-patches "fix the failing tests"
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
`--protocol-full-patches` keeps patch payloads untruncated while still compacting
|
|
34
|
+
large file contents, prompts, shell output, and LLM responses.
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
brass-agent --apply-patch-file ./approved.diff --yes "apply approved patch"
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
`--apply-patch-file` supplies a precomputed unified diff to the agent and runs in
|
|
41
|
+
write mode. P13 deliberately disables repair attempts for this exact patch-file path, so the approved diff remains the only diff applied. The diff still flows through:
|
|
42
|
+
|
|
43
|
+
```txt
|
|
44
|
+
AgentGoal.initialPatch
|
|
45
|
+
-> decideNextAction
|
|
46
|
+
-> patch.apply
|
|
47
|
+
-> PermissionService
|
|
48
|
+
-> ApprovalService
|
|
49
|
+
-> PatchService
|
|
50
|
+
-> git apply --check
|
|
51
|
+
-> git apply
|
|
52
|
+
-> validation command discovery
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
`--patch-file PATH` is the lower-level variant that supplies a patch but respects
|
|
56
|
+
the selected `--mode`. In `propose` mode it records `patch.proposed`; in `write`
|
|
57
|
+
mode it applies through the normal policy path.
|
|
58
|
+
|
|
59
|
+
## VS Code commands
|
|
60
|
+
|
|
61
|
+
The extension now contributes:
|
|
62
|
+
|
|
63
|
+
```txt
|
|
64
|
+
Brass Agent: Propose Fix
|
|
65
|
+
Brass Agent: Apply Fix
|
|
66
|
+
Brass Agent: Inspect Workspace
|
|
67
|
+
Brass Agent: Show Last Patch Preview
|
|
68
|
+
Brass Agent: Show Output
|
|
69
|
+
Brass Agent: Cancel Current Run
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
`Apply Fix` no longer gives the CLI immediate write permissions. It generates a
|
|
73
|
+
proposal first, then opens the patch preview. The actual apply only happens after
|
|
74
|
+
the user clicks `Apply Patch` in the webview and confirms the modal prompt.
|
|
75
|
+
|
|
76
|
+
`Show Last Patch Preview` reopens the most recent proposed patch for the current
|
|
77
|
+
extension session.
|
|
78
|
+
|
|
79
|
+
## Boundary invariant
|
|
80
|
+
|
|
81
|
+
The extension may render and approve a patch, but the CLI remains the authority
|
|
82
|
+
for applying it.
|
|
83
|
+
|
|
84
|
+
```txt
|
|
85
|
+
extensions/vscode-brass-agent
|
|
86
|
+
-> temporary diff file
|
|
87
|
+
-> brass-agent --apply-patch-file
|
|
88
|
+
-> src/agent PatchService
|
|
89
|
+
-> src/core runtime
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
The extension never shells out to `git apply` directly.
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# VS Code problems-aware chat
|
|
2
|
+
|
|
3
|
+
P33 teaches the VS Code client to use the editor's current diagnostics as first-class context.
|
|
4
|
+
|
|
5
|
+
The agent still runs through the normal `brass-agent` CLI boundary. VS Code only gathers diagnostics and includes them in the chat prompt; it does not bypass permissions, approvals, patch preview, rollback, or validation.
|
|
6
|
+
|
|
7
|
+
## Chat slash commands
|
|
8
|
+
|
|
9
|
+
The Chat view supports these problem-aware commands:
|
|
10
|
+
|
|
11
|
+
```txt
|
|
12
|
+
/problems
|
|
13
|
+
/explain-problems
|
|
14
|
+
/fix-problems
|
|
15
|
+
/current-file-problems
|
|
16
|
+
/explain-current-file
|
|
17
|
+
/fix-current-file
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Examples:
|
|
21
|
+
|
|
22
|
+
```txt
|
|
23
|
+
/fix-problems
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
```txt
|
|
27
|
+
/fix-current-file prefer a minimal patch
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
`/fix-problems` uses diagnostics from the whole workspace. `/fix-current-file` only uses diagnostics from the active editor.
|
|
31
|
+
|
|
32
|
+
## Command Palette
|
|
33
|
+
|
|
34
|
+
The extension also contributes:
|
|
35
|
+
|
|
36
|
+
```txt
|
|
37
|
+
Brass Agent: Explain Workspace Problems
|
|
38
|
+
Brass Agent: Fix Workspace Problems
|
|
39
|
+
Brass Agent: Fix Current File Problems
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
These commands open the Chat view with a prompt that includes VS Code diagnostics.
|
|
43
|
+
|
|
44
|
+
## Context chips
|
|
45
|
+
|
|
46
|
+
The Chat view shows diagnostic count chips when VS Code has problems available:
|
|
47
|
+
|
|
48
|
+
```txt
|
|
49
|
+
problems 12
|
|
50
|
+
file problems 3
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
These counts come from `vscode.languages.getDiagnostics()` and update when diagnostics or the active editor change.
|
|
54
|
+
|
|
55
|
+
## Configuration
|
|
56
|
+
|
|
57
|
+
Limit how many diagnostics are included in a prompt:
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"brassAgent.problemContextLimit": 40
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
If there are more diagnostics, the prompt includes the first `problemContextLimit` diagnostics and notes how many were omitted.
|
|
66
|
+
|
|
67
|
+
## Safety
|
|
68
|
+
|
|
69
|
+
Diagnostics are treated as context only. A problem-aware run still follows:
|
|
70
|
+
|
|
71
|
+
```txt
|
|
72
|
+
VS Code diagnostics
|
|
73
|
+
-> Chat prompt
|
|
74
|
+
-> brass-agent --protocol-json
|
|
75
|
+
-> PermissionService
|
|
76
|
+
-> ApprovalService when needed
|
|
77
|
+
-> Patch preview
|
|
78
|
+
-> exact patch apply via CLI
|
|
79
|
+
```
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# VS Code Project Dashboard
|
|
2
|
+
|
|
3
|
+
P44 adds a **Project** view to the Brass Agent VS Code sidebar.
|
|
4
|
+
|
|
5
|
+
The dashboard answers the question:
|
|
6
|
+
|
|
7
|
+
```txt
|
|
8
|
+
What does Brass Agent know about this workspace right now?
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
It is intentionally read-mostly. The view does not run the full agent loop unless you click **Inspect Workspace**. It uses `brass-agent --doctor --json` plus VS Code settings and workspace config to show a compact readiness summary.
|
|
12
|
+
|
|
13
|
+
## What it shows
|
|
14
|
+
|
|
15
|
+
The dashboard shows:
|
|
16
|
+
|
|
17
|
+
```txt
|
|
18
|
+
Status
|
|
19
|
+
Ready: ok | warn | fail
|
|
20
|
+
Workspace path
|
|
21
|
+
Doctor status
|
|
22
|
+
Resolved CLI
|
|
23
|
+
|
|
24
|
+
Model
|
|
25
|
+
Provider/model
|
|
26
|
+
Whether a key is configured for VS Code-launched runs
|
|
27
|
+
|
|
28
|
+
Workspace config
|
|
29
|
+
.brass-agent.json path, if present
|
|
30
|
+
Response language
|
|
31
|
+
Validation command
|
|
32
|
+
Package manager
|
|
33
|
+
|
|
34
|
+
Project profile
|
|
35
|
+
Detected stacks and markers
|
|
36
|
+
Likely validation command
|
|
37
|
+
Env file status
|
|
38
|
+
|
|
39
|
+
Warnings
|
|
40
|
+
Important doctor warnings/failures
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
For a mixed workspace, this might look like:
|
|
44
|
+
|
|
45
|
+
```txt
|
|
46
|
+
Profile: stacks: node, rust, tauri, desktop, bridge, monorepo
|
|
47
|
+
Validation: npm run repo:check
|
|
48
|
+
Model: Google/Gemini (gemini-2.5-flash)
|
|
49
|
+
Language: es
|
|
50
|
+
Config: .brass-agent.json
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Opening it
|
|
54
|
+
|
|
55
|
+
From the sidebar:
|
|
56
|
+
|
|
57
|
+
```txt
|
|
58
|
+
Brass Agent → Project
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
From Command Palette:
|
|
62
|
+
|
|
63
|
+
```txt
|
|
64
|
+
Brass Agent: Open Project Dashboard
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
From Chat:
|
|
68
|
+
|
|
69
|
+
```txt
|
|
70
|
+
/project
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Actions
|
|
74
|
+
|
|
75
|
+
The Project view includes quick actions:
|
|
76
|
+
|
|
77
|
+
```txt
|
|
78
|
+
Refresh
|
|
79
|
+
Run Doctor
|
|
80
|
+
Open Chat
|
|
81
|
+
Configure Model
|
|
82
|
+
Configure Workspace
|
|
83
|
+
Open Config
|
|
84
|
+
Inspect Workspace
|
|
85
|
+
Show Output
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
`Configure Workspace` is the quickest way to create or update `.brass-agent.json` from VS Code. Use it when the dashboard shows no validation command or the wrong language.
|
|
89
|
+
|
|
90
|
+
## Boundary
|
|
91
|
+
|
|
92
|
+
The dashboard is still a thin VS Code UI:
|
|
93
|
+
|
|
94
|
+
```txt
|
|
95
|
+
VS Code Project view
|
|
96
|
+
-> brass-agent --doctor --json
|
|
97
|
+
-> VS Code settings / Secret Storage
|
|
98
|
+
-> .brass-agent.json summary
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
It does not duplicate project intelligence, patching, permissions, or validation logic. Those remain in the CLI/agent layer.
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
## Larger dashboard layout
|
|
105
|
+
|
|
106
|
+
Use `Brass Agent: Open Project Dashboard in Editor` to inspect the same dashboard in a wider editor tab. This keeps the sidebar available for Chat or Explorer while reviewing model, validation, config, and project profile details.
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# VS Code run history
|
|
2
|
+
|
|
3
|
+
P11 adds a persistent VS Code sidebar for Brass Agent runs.
|
|
4
|
+
|
|
5
|
+
The extension remains a thin client:
|
|
6
|
+
|
|
7
|
+
```txt
|
|
8
|
+
brass-agent CLI --protocol-json
|
|
9
|
+
-> VS Code process runner
|
|
10
|
+
-> workspace run history
|
|
11
|
+
-> TreeView / patch preview / rerun commands
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
The extension does not reimplement planning, permissions, approvals, patch
|
|
15
|
+
application, or validation. Those still live behind the CLI and `src/agent`.
|
|
16
|
+
|
|
17
|
+
## Sidebar
|
|
18
|
+
|
|
19
|
+
The extension contributes a `Brass Agent` activity-bar view with a `Runs`
|
|
20
|
+
TreeView.
|
|
21
|
+
|
|
22
|
+
Each run entry shows:
|
|
23
|
+
|
|
24
|
+
- goal
|
|
25
|
+
- mode
|
|
26
|
+
- status
|
|
27
|
+
- start time
|
|
28
|
+
- workspace
|
|
29
|
+
- duration
|
|
30
|
+
- step count
|
|
31
|
+
- patch stats when a patch was proposed or applied
|
|
32
|
+
|
|
33
|
+
Selecting a run opens a Markdown details document. Runs with stored patches can
|
|
34
|
+
reopen the patch preview webview.
|
|
35
|
+
|
|
36
|
+
## Commands
|
|
37
|
+
|
|
38
|
+
New commands:
|
|
39
|
+
|
|
40
|
+
```txt
|
|
41
|
+
Brass Agent: Open Run Details
|
|
42
|
+
Brass Agent: Show History Patch
|
|
43
|
+
Brass Agent: Rerun History Run
|
|
44
|
+
Brass Agent: Refresh History
|
|
45
|
+
Brass Agent: Clear History
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
The view title includes refresh and clear actions. Run items expose context-menu
|
|
49
|
+
commands for details, patch preview, and rerun.
|
|
50
|
+
|
|
51
|
+
## Persistence
|
|
52
|
+
|
|
53
|
+
History is stored in VS Code `workspaceState` under a versioned key. This keeps
|
|
54
|
+
history local to the workspace and avoids adding persistence concerns to the
|
|
55
|
+
runtime or agent core.
|
|
56
|
+
|
|
57
|
+
Configuration:
|
|
58
|
+
|
|
59
|
+
```json
|
|
60
|
+
{
|
|
61
|
+
"brassAgent.historyLimit": 50,
|
|
62
|
+
"brassAgent.storePatchesInHistory": true
|
|
63
|
+
}
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
`historyLimit` controls how many runs are retained.
|
|
67
|
+
|
|
68
|
+
`storePatchesInHistory` controls whether unified diff payloads are stored in VS
|
|
69
|
+
Code workspace storage. Disable it if you do not want patch contents persisted
|
|
70
|
+
by the editor client.
|
|
71
|
+
|
|
72
|
+
## Rerun behavior
|
|
73
|
+
|
|
74
|
+
Rerunning a normal run invokes the same goal and mode through the CLI again.
|
|
75
|
+
|
|
76
|
+
Rerunning an `apply-approved-patch` history entry reapplies the stored patch via
|
|
77
|
+
`brass-agent --apply-patch-file`, preserving the invariant that VS Code never
|
|
78
|
+
applies patches directly.
|
|
79
|
+
|
|
80
|
+
## Boundary rule
|
|
81
|
+
|
|
82
|
+
The sidebar is editor state, not agent state.
|
|
83
|
+
|
|
84
|
+
```txt
|
|
85
|
+
src/core no knowledge of VS Code
|
|
86
|
+
src/agent no knowledge of VS Code history
|
|
87
|
+
brass-agent CLI protocol stable boundary
|
|
88
|
+
VS Code extension client-side history and UX
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
If a future UX needs richer history, prefer extending the CLI protocol before
|
|
92
|
+
teaching the VS Code extension about internal agent implementation details.
|