Implement explicit session lifecycle and task-scoped worktrees
This commit is contained in:
@@ -28,6 +28,7 @@ export async function createSessionContext(
|
||||
provider: SessionProvider,
|
||||
input: {
|
||||
prompt: string;
|
||||
workspaceRoot: string;
|
||||
config?: Readonly<AppConfig>;
|
||||
mcpRegistry?: McpRegistry;
|
||||
},
|
||||
@@ -58,6 +59,7 @@ export async function createSessionContext(
|
||||
provisionedResources = await resourceProvisioning.provisionSession({
|
||||
sessionId: agentSession.id,
|
||||
resources: [{ kind: "git-worktree" }, { kind: "port-range" }],
|
||||
workspaceRoot: input.workspaceRoot,
|
||||
});
|
||||
|
||||
const providerAuthEnv =
|
||||
@@ -82,6 +84,7 @@ export async function createSessionContext(
|
||||
{
|
||||
providerHint: provider,
|
||||
prompt: input.prompt,
|
||||
workingDirectory: runtimeInjection.workingDirectory,
|
||||
},
|
||||
{
|
||||
config,
|
||||
|
||||
Reference in New Issue
Block a user