fix(core): expose Instance.directory to custom tools

This commit is contained in:
adamelmore 2026-01-26 19:57:34 -06:00
parent 6cf2c3e3db
commit a8c18dba82
No known key found for this signature in database
GPG key ID: 9CB48779AF150E75
4 changed files with 15 additions and 7 deletions

View file

@ -4,6 +4,11 @@ export type ToolContext = {
sessionID: string
messageID: string
agent: string
/**
* Current project directory for this session.
* Prefer this over process.cwd() when resolving relative paths.
*/
directory: string
abort: AbortSignal
metadata(input: { title?: string; metadata?: { [key: string]: any } }): void
ask(input: AskInput): Promise<void>