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 { On } from 'claude-code'
import { registeredToolOf } from './registered-tool-of.js'
/**
* A session starting, where each tool a plugin asks for is registered and
* kept by the name of the plugin that asked.
*
* @param on the test's `on`
* @returns the plugins whose tools were registered, in order
*/
export function toolsRegistered(on: On) {
const registered: string[] = []
on('session.start', ($, e) => ({ cwd: e.cwd }))
on('tool.register', ($, e, next) => {
registered.push(next.origin.plugin)
return registeredToolOf(next.origin.plugin, e.name)
})
return registered
}