You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**`DefaultTurnRunner`** is the **`ITurnRunner`** implementation used for prompt turns. It:
13
13
14
-
1. Calls **`IPromptContextAssembler.AssembleAsync`** to build **`PromptContext`** (prompt text, metadata such as resolved **`model`**).
15
-
2. Maps **`RunPromptRequest`** + session into **`AgentRunContext`** (session/turn ids, working directory, permission mode, output format, **`IToolExecutor`**, metadata).
14
+
1. Calls **`IPromptContextAssembler.AssembleAsync`** to build **`PromptContext`** (prompt text, metadata such as resolved **`model`**, and prior-turn conversation history assembled from persisted runtime events).
15
+
2. Maps **`RunPromptRequest`** + session into **`AgentRunContext`** (session/turn ids, working directory, permission mode, output format, **`IToolExecutor`**, metadata, and normalized caller interactivity).
16
16
3. Invokes **`PrimaryCodingAgent.RunAsync`**.
17
17
18
18
Before the agent runs, **`ConversationRuntime`** also layers in:
@@ -24,6 +24,17 @@ Before the agent runs, **`ConversationRuntime`** also layers in:
24
24
25
25
The agent stack is described in [agents.md](agents.md).
26
26
27
+
## Agent tool loop
28
+
29
+
The current runtime supports provider-driven tool calling through the normal agent path.
30
+
31
+
-**`AgentFrameworkBridge`** resolves the effective allowed-tool set from agent metadata.
32
+
- It advertises only that filtered tool set to the provider.
33
+
-**`ProviderBackedAgentKernel`** runs the provider loop, dispatches tool-use events through **`IToolExecutor`**, and feeds tool results back into the next provider iteration.
34
+
- Tool execution still goes through the normal permission engine, so allowlists, approval requirements, plugin trust, MCP trust, and primary-mode mutation restrictions all apply consistently.
35
+
36
+
This means the model-visible tool surface and the executor-visible tool surface are derived from the same resolved policy input.
@@ -35,8 +46,15 @@ The agent stack is described in [agents.md](agents.md).
35
46
36
47
It also includes a compact diagnostics summary from **`IWorkspaceDiagnosticsService`**, which currently surfaces configured diagnostics sources and build-derived findings for .NET workspaces.
37
48
49
+
Prompt references are resolved before provider execution. Outside-workspace file references are evaluated through the permission engine, and the approval path now respects the normalized caller interactivity mode:
50
+
51
+
- interactive CLI and REPL callers can participate in approval prompts
52
+
- non-interactive surfaces such as ACP and the embedded HTTP server cannot
53
+
38
54
When the effective **`PrimaryMode`** is **`Spec`**, the assembler appends a structured output contract that requires the model to return machine-readable requirements, design, and task content.
39
55
56
+
Conversation history is rebuilt from persisted session events and truncated by token budget before being attached to the next provider request. Assistant history prefers the persisted final turn output and only falls back to streamed provider deltas when needed.
57
+
40
58
## Spec workflow
41
59
42
60
**`ISpecWorkflowService`** handles the post-processing path for **`spec`** mode:
0 commit comments