feat(core): add worktree to plugin tool context

This commit is contained in:
adamelmore 2026-01-27 06:12:47 -06:00
commit 1f9313847f
No known key found for this signature in database
GPG key ID: 9CB48779AF150E75
2 changed files with 10 additions and 1 deletions

View file

@ -9,6 +9,11 @@ export type ToolContext = {
* Prefer this over process.cwd() when resolving relative paths.
*/
directory: string
/**
* Project worktree root for this session.
* Useful for generating stable relative paths (e.g. path.relative(worktree, absPath)).
*/
worktree: string
abort: AbortSignal
metadata(input: { title?: string; metadata?: { [key: string]: any } }): void
ask(input: AskInput): Promise<void>