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.
TypeScript
import type { Plugin } from 'claude-code/testing'
/**
* A plugin a person installed whose `/visit <entry>` logs the entry's event
* and properties through `$.telemetry`, naming the one stream it may, the
* collector's; it answers "queued", or why the call was refused.
*/
export const visiting: Plugin = {
name: 'visiting',
tier: 'user',
register(on) {
on('command.run', { command: 'visit' }, ($, e) => {
const { event, props } = JSON.parse(e.args)
return $.telemetry.log({ to: 'collector', event, props }).then(
() => ({ text: 'queued' }),
(error: unknown) => ({ text: String(error) }),
)
})
},
}