From 1f9313847f61978faf3b8459e68386c1d3834b90 Mon Sep 17 00:00:00 2001 From: adamelmore <2363879+adamdottv@users.noreply.github.com> Date: Tue, 27 Jan 2026 06:12:47 -0600 Subject: feat(core): add worktree to plugin tool context --- packages/plugin/src/tool.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'packages/plugin/src') diff --git a/packages/plugin/src/tool.ts b/packages/plugin/src/tool.ts index 6b4f7f1d1..23aa512d9 100644 --- a/packages/plugin/src/tool.ts +++ b/packages/plugin/src/tool.ts @@ -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 -- cgit v1.2.3