fix(coding-agent): remove process-cwd tool singletons and use tool-name allowlists
- switch SDK/CLI tool selection to name-based allowlists - apply allowlists across built-in, extension, and SDK tools - remove ambient process.cwd defaults from core tooling and resource helpers - update tests, examples, and TUI callers for explicit cwd plumbing - add regression coverage for extension tool filtering closes #3452 closes #2835
This commit is contained in:
@@ -133,9 +133,6 @@ export class AgentSessionRuntime {
|
||||
}
|
||||
|
||||
private apply(result: CreateAgentSessionRuntimeResult): void {
|
||||
if (process.cwd() !== result.services.cwd) {
|
||||
process.chdir(result.services.cwd);
|
||||
}
|
||||
this._session = result.session;
|
||||
this._services = result.services;
|
||||
this._diagnostics = result.diagnostics;
|
||||
@@ -346,9 +343,6 @@ export async function createAgentSessionRuntime(
|
||||
): Promise<AgentSessionRuntime> {
|
||||
assertSessionCwdExists(options.sessionManager, options.cwd);
|
||||
const result = await createRuntime(options);
|
||||
if (process.cwd() !== result.services.cwd) {
|
||||
process.chdir(result.services.cwd);
|
||||
}
|
||||
return new AgentSessionRuntime(
|
||||
result.session,
|
||||
result.services,
|
||||
|
||||
Reference in New Issue
Block a user