Commit 0559f1e
committed
feat(local): address remaining important gaps
- Deduplicate parsePort: export from server.ts, import in run.ts
- Fix signal handler leak in run.ts: store refs, remove in finally,
add settled flag to prevent close/error race
- Add SSE reconnection with exponential backoff and Last-Event-ID
resume support in the SSE consumer
- Add --format json flag for NDJSON output (machine-readable output
for AI coding agents and automation tools)
- Preserve existing SENTRY_TRACES_SAMPLE_RATE (use ?? fallback)
- Add agent monitoring section to docs with gen_ai/mcp examples
- Add JSON output section to docs
- Add server.test.ts: parsePort, feedSSELine (with id tracking),
buildApp (health, ingest, CORS, SSE, 413 rejection), isServerRunning
- Expand run.test.ts: -- separator stripping, ENOENT handling,
SENTRY_TRACES_SAMPLE_RATE preservation1 parent 344ab58 commit 0559f1e
6 files changed
Lines changed: 717 additions & 54 deletions
File tree
- docs/src/fragments/commands
- src
- commands/local
- lib/formatters
- test/commands/local
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | 33 | | |
45 | 34 | | |
46 | 35 | | |
| |||
140 | 129 | | |
141 | 130 | | |
142 | 131 | | |
143 | | - | |
| 132 | + | |
| 133 | + | |
144 | 134 | | |
145 | 135 | | |
146 | 136 | | |
| |||
155 | 145 | | |
156 | 146 | | |
157 | 147 | | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
163 | 153 | | |
164 | 154 | | |
165 | 155 | | |
166 | 156 | | |
167 | | - | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
168 | 164 | | |
169 | 165 | | |
170 | 166 | | |
171 | | - | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
172 | 171 | | |
173 | 172 | | |
174 | 173 | | |
| 174 | + | |
| 175 | + | |
175 | 176 | | |
176 | 177 | | |
177 | 178 | | |
| |||
0 commit comments