spacehub

surshar / claude-code

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

Built by Anthropic · github.com/anthropics

telemetry: the engine.create step spreads what is beneath last, so a telemetry it already has standsBrowse files
poteat authored 28 days ago parent 027ef26 · commit e97771e0e722
2 changed files+6 -6compared with 027ef26
Mmods/telemetry/README.md
Mmods/telemetry/hooks/register.ts
@@ -69,9 +69,10 @@
6969 `telemetry.log` and `telemetry.mark`, beneath the gate: the entry is checked
7070 and its row queued, the hook answering `{ value }`, or `{ deny }` with the
7171 reason for an entry that breaks a rule, so the caller's promise rejects
72-naming it. `engine.create`: the sender is built over `await next(e)`, which
73-is handed up as it is where it already has a `telemetry`, and as
74-`{ ...beneath, telemetry }` where it has none; nothing beneath is replaced.
72+naming it. `engine.create`: the sender is built over `await next(e)`, and
73+the step hands up `{ ...{ telemetry }, ...beneath }`: what is beneath is
74+spread last, so its own `telemetry` stands where it has one and this mod's
75+is added where it has none; nothing beneath is replaced.
7576 `session.start`, to learn whether a person is at the prompt; `session.end`,
7677 to send what still waits.
7778
@@ -362,9 +362,8 @@
362362 })
363363
364364 const telemetry: EngineInterface['telemetry'] = sender.telemetry
365+ const added = { telemetry }
365366
366- return Object.hasOwn(beneath, 'telemetry')
367- ? beneath
368- : { ...beneath, telemetry }
367+ return { ...added, ...beneath }
369368 })
370369 }