Skip to content

Evenfire is an intelligence layer platform for running LLM agents that take real actions, on your infrastructure

TypeScript

refactor(mcp-host,desktop-app): prune dead `provider` field from connect_required marker

Diego Zacarias48fc12df9a44
diff --git a/desktop-app/src/__tests__/rpcProxyClient.test.ts b/desktop-app/src/__tests__/rpcProxyClient.test.ts
index ecf52e8e8..c7f5de222 100644
--- a/desktop-app/src/__tests__/rpcProxyClient.test.ts
+++ b/desktop-app/src/__tests__/rpcProxyClient.test.ts
@@ -404,7 +404,7 @@ describe('RpcProxyClient.listSessions', () => {
})
})
- it('surfaces U5 connect_required pendingApproval fields (reason/mcpServerName/provider)', async () => {
+ it('surfaces U5 connect_required pendingApproval fields (reason/mcpServerName) and drops a dead provider', async () => {
vi.stubGlobal(
'fetch',
vi.fn().mockResolvedValue({
@@ -419,6 +419,8 @@ describe('RpcProxyClient.listSessions', () => {
displayName: 'clickup: create task',
reason: 'connect_required',
mcpServerName: 'mcp-clickup',
+ // Even if a legacy server still emits `provider`, the parser drops it:
+ // under HCC v2 it is always undefined and no renderer/action consumes it.
provider: 'clickup',
},
turns: [],
@@ -426,17 +428,16 @@ describe('RpcProxyClient.listSessions', () => {
})
)
- await expect(
- client.loadSessionMessages('token', 'host', 'agent-a', 'chat-a')
- ).resolves.toMatchObject({
+ const result = await client.loadSessionMessages('token', 'host', 'agent-a', 'chat-a')
+ expect(result).toMatchObject({
pendingApproval: {
requestId: 'req-1',
displayName: 'clickup: create task',
reason: 'connect_required',
mcpServerName: 'mcp-clickup',
- provider: 'clickup',
},
})
+ expect(result.pendingApproval).not.toHaveProperty('provider')
})
it('keeps generic pendingApproval byte-identical when the U5 fields are absent (back-compat)', async () => {
diff --git a/desktop-app/src/rpcProxyClient.ts b/desktop-app/src/rpcProxyClient.ts
index 4caf9ef95..ee6cd4a38 100644
--- a/desktop-app/src/rpcProxyClient.ts
+++ b/desktop-app/src/rpcProxyClient.ts
@@ -80,21 +80,19 @@ function parseSessionState(value: unknown, label: string): SessionLifecycleState
function parsePendingApproval(value: unknown, label: string): PendingApprovalLite | undefined {
if (value === undefined || value === null) return undefined
const record = wireObject(value, label)
- // U5 (mcp-oauth reactive consent): `reason`/`mcpServerName`/`provider` are
- // additive. They ride the same REST wire as the generic approval descriptor
- // and MUST be surfaced so the renderer can branch a `connect_required`
- // suspension into an OAuth "Connect <provider>" affordance instead of a
- // generic tool approval. An absent `reason` (or any value other than
- // `connect_required`) keeps the byte-identical generic-approval flow.
+ // U5 (mcp-oauth reactive consent): `reason`/`mcpServerName` are additive. They
+ // ride the same REST wire as the generic approval descriptor and MUST be
+ // surfaced so the renderer can branch a `connect_required` suspension into an
+ // OAuth "Connect <server>" affordance instead of a generic tool approval. An
+ // absent `reason` (or any value other than `connect_required`) keeps the
+ // byte-identical generic-approval flow.
const reason = optionalWireString(record.reason, `${label}.reason`)
const mcpServerName = optionalWireString(record.mcpServerName, `${label}.mcpServerName`)
- const provider = optionalWireString(record.provider, `${label}.provider`)
return {
requestId: wireString(record.requestId, `${label}.requestId`),
displayName: wireString(record.displayName, `${label}.displayName`),
...(reason !== undefined ? { reason } : {}),
...(mcpServerName !== undefined ? { mcpServerName } : {}),
- ...(provider !== undefined ? { provider } : {}),
}
}
diff --git a/desktop-app/src/types.ts b/desktop-app/src/types.ts
index 3f803d203..434603d95 100644
--- a/desktop-app/src/types.ts
+++ b/desktop-app/src/types.ts
@@ -808,12 +808,11 @@ export type TaskProgressStreamEvent =
displayName: string
reason: string
// U5 (mcp-oauth reactive consent): present ONLY when
- // `reason === 'connect_required'` — the mcp-host emitter attaches these
- // so the desktop renders a "Connect <server>" prompt (not the generic
+ // `reason === 'connect_required'` — the mcp-host emitter attaches this so
+ // the desktop renders a "Connect <server>" prompt (not the generic
// approval prompt) and correlates the later deep-link completion back to
// this suspension by `mcpServerName`. Absent for `approval_required`.
mcpServerName?: string
- provider?: string
}
}
| { type: 'cancelled'; data: { taskId: string; reason: string } }
@@ -884,12 +883,11 @@ export interface PendingApprovalLite {
displayName: string
// U5 (mcp-oauth reactive consent): additive. `reason === 'connect_required'`
// marks a suspension that needs an OAuth "Connect <server>" flow rather than a
- // generic tool approval; `mcpServerName`/`provider` identify the server to
- // connect and correlate the deep-link completion back to this suspension.
+ // generic tool approval; `mcpServerName` identifies the server to connect and
+ // correlates the deep-link completion back to this suspension.
// Absent on ordinary `approval_required` suspensions (byte-identical there).
reason?: string
mcpServerName?: string
- provider?: string
}
/**
diff --git a/desktop-app/ui/src/components/agents/InFlightAssistantPlaceholder.tsx b/desktop-app/ui/src/components/agents/InFlightAssistantPlaceholder.tsx
index ad50939ca..e8f1c79d1 100644
--- a/desktop-app/ui/src/components/agents/InFlightAssistantPlaceholder.tsx
+++ b/desktop-app/ui/src/components/agents/InFlightAssistantPlaceholder.tsx
@@ -28,7 +28,6 @@ interface Props {
// suspended replays.
reason?: string
mcpServerName?: string
- provider?: string
}
}
diff --git a/desktop-app/ui/src/contexts/AgentTaskTrackerContext/taskTracker.ts b/desktop-app/ui/src/contexts/AgentTaskTrackerContext/taskTracker.ts
index 74b11e101..ff3b3667b 100644
--- a/desktop-app/ui/src/contexts/AgentTaskTrackerContext/taskTracker.ts
+++ b/desktop-app/ui/src/contexts/AgentTaskTrackerContext/taskTracker.ts
@@ -594,7 +594,6 @@ export class TaskTracker implements AgentTaskTracker {
// resume the right task. Undefined for ordinary approvals.
reason: sd.reason,
mcpServerName: sd.mcpServerName,
- provider: sd.provider,
}
: undefined
})
diff --git a/desktop-app/ui/src/contexts/AgentTaskTrackerContext/types.ts b/desktop-app/ui/src/contexts/AgentTaskTrackerContext/types.ts
index aa0f97020..9ee5a8cfc 100644
--- a/desktop-app/ui/src/contexts/AgentTaskTrackerContext/types.ts
+++ b/desktop-app/ui/src/contexts/AgentTaskTrackerContext/types.ts
@@ -37,11 +37,10 @@ export interface TaskPendingApproval {
displayName: string
// U5 (mcp-oauth reactive consent): `reason === 'connect_required'` marks an
// OAuth "Connect <server>" suspension (vs a generic tool approval);
- // `mcpServerName`/`provider` identify the server and correlate the deep-link
+ // `mcpServerName` identifies the server and correlates the deep-link
// completion back to this task. Absent on ordinary approval suspensions.
reason?: string
mcpServerName?: string
- provider?: string
}
/**
diff --git a/desktop-app/ui/src/hooks/domain/trackerToProgress.ts b/desktop-app/ui/src/hooks/domain/trackerToProgress.ts
index 6e19d50fd..f941f6e6f 100644
--- a/desktop-app/ui/src/hooks/domain/trackerToProgress.ts
+++ b/desktop-app/ui/src/hooks/domain/trackerToProgress.ts
@@ -40,7 +40,6 @@ export function trackerStateToTaskProgress(state: TaskState): TaskProgress {
// connect_required suspension instead of the generic approval prompt.
reason: state.pendingApproval.reason,
mcpServerName: state.pendingApproval.mcpServerName,
- provider: state.pendingApproval.provider,
}
: undefined,
cancelReason:
diff --git a/desktop-app/ui/src/hooks/domain/useAgentChatController.ts b/desktop-app/ui/src/hooks/domain/useAgentChatController.ts
index 9fee63fcb..b34db491f 100644
--- a/desktop-app/ui/src/hooks/domain/useAgentChatController.ts
+++ b/desktop-app/ui/src/hooks/domain/useAgentChatController.ts
@@ -2336,12 +2336,11 @@ export function useAgentChatController({
? {
requestId: state.pendingApproval.requestId,
displayName: state.pendingApproval.displayName || 'Unknown Tool',
- // U5: carry the connect_required discriminator (+ server/provider) so the
+ // U5: carry the connect_required discriminator (+ server) so the
// live message ProgressStepper renders "Connect <server>" instead of a
// generic Approve/Deny prompt. Absent on ordinary approval suspensions.
reason: state.pendingApproval.reason,
mcpServerName: state.pendingApproval.mcpServerName,
- provider: state.pendingApproval.provider,
}
: activeFsmApproval
? {
@@ -2354,7 +2353,6 @@ export function useAgentChatController({
// branch above and InFlightAssistantPlaceholder's fallback.
reason: activeFsmApproval.reason,
mcpServerName: activeFsmApproval.mcpServerName,
- provider: activeFsmApproval.provider,
}
: undefined
updateMessageProgress(selectedAgent, state.userMessageId, () => ({
diff --git a/desktop-app/ui/src/uiTypes.ts b/desktop-app/ui/src/uiTypes.ts
index ce23a9201..9b52fe13c 100644
--- a/desktop-app/ui/src/uiTypes.ts
+++ b/desktop-app/ui/src/uiTypes.ts
@@ -178,7 +178,6 @@ export interface SuspendedInfo {
* is the server to connect. Absent on ordinary approval suspensions. */
reason?: string
mcpServerName?: string
- provider?: string
}
export interface TaskProgress {
diff --git a/mcp-host/package-lock.json b/mcp-host/package-lock.json
index 334de5413..703d22a0a 100644
--- a/mcp-host/package-lock.json
+++ b/mcp-host/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "clerum-mcp-host",
- "version": "0.1.281",
+ "version": "0.1.282",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "clerum-mcp-host",
- "version": "0.1.281",
+ "version": "0.1.282",
"license": "SEE LICENSE IN LICENSE",
"dependencies": {
"@anthropic-ai/sdk": "^0.32.0",
diff --git a/mcp-host/package.json b/mcp-host/package.json
index c2549fe0f..b1c80442f 100644
--- a/mcp-host/package.json
+++ b/mcp-host/package.json
@@ -1,6 +1,6 @@
{
"name": "clerum-mcp-host",
- "version": "0.1.281",
+ "version": "0.1.282",
"description": "MCP Host - reads Host CRD and provides LLM access via OpenAI/Claude",
"main": "dist/main.js",
"engines": {
diff --git a/mcp-host/src/__tests__/messageHandler.test.ts b/mcp-host/src/__tests__/messageHandler.test.ts
index 826b5afd9..950a3b281 100644
--- a/mcp-host/src/__tests__/messageHandler.test.ts
+++ b/mcp-host/src/__tests__/messageHandler.test.ts
@@ -138,7 +138,7 @@ describe('IncomingMessageHandler', () => {
const approval = buildConnectRequiredApproval(
{ id: 'tc_1', name: 'monday__list_boards', arguments: { limit: 5 } },
- { mcpServerName: 'monday', provider: 'monday' }
+ { mcpServerName: 'monday' }
)
deps.agent.emit('tool:approval_needed', {
data: {
@@ -148,7 +148,6 @@ describe('IncomingMessageHandler', () => {
notification: 'Connect monday to continue',
reason: approval.reason,
mcpServerName: approval.mcpServerName,
- provider: approval.provider,
},
})
@@ -157,8 +156,8 @@ describe('IncomingMessageHandler', () => {
expect(result.approval).toMatchObject({
reason: 'connect_required',
mcpServerName: 'monday',
- provider: 'monday',
})
+ expect(result.approval).not.toHaveProperty('provider')
})
it('resolves a generic waiting_approval without connect fields (back-compat, sync path)', async () => {
@@ -299,7 +298,7 @@ describe('IncomingMessageHandler', () => {
const approval = buildConnectRequiredApproval(
{ id: 'tc_1', name: 'monday__list_boards', arguments: { limit: 5 } },
- { mcpServerName: 'monday', provider: 'monday' }
+ { mcpServerName: 'monday' }
)
deps.agent.emit('tool:approval_needed', {
data: {
@@ -309,7 +308,6 @@ describe('IncomingMessageHandler', () => {
notification: 'Connect monday to continue',
reason: approval.reason,
mcpServerName: approval.mcpServerName,
- provider: approval.provider,
},
})
@@ -320,8 +318,8 @@ describe('IncomingMessageHandler', () => {
expect(stored!.approval).toMatchObject({
reason: 'connect_required',
mcpServerName: 'monday',
- provider: 'monday',
})
+ expect(stored!.approval).not.toHaveProperty('provider')
})
it('stores a generic async approval without connect fields (back-compat)', async () => {
diff --git a/mcp-host/src/agent/__tests__/concurrentExecution.test.ts b/mcp-host/src/agent/__tests__/concurrentExecution.test.ts
index 96fa4f9e4..999673c2b 100644
--- a/mcp-host/src/agent/__tests__/concurrentExecution.test.ts
+++ b/mcp-host/src/agent/__tests__/concurrentExecution.test.ts
@@ -138,10 +138,10 @@ describe('AgentStateMachine -- concurrent execution', () => {
// same discriminator the SSE `suspended` event does, so the desktop renders
// "Connect <server>" instead of a generic approval. Fixture built by the REAL
// producer (buildConnectRequiredApproval), never hand-shaped (T1).
- it('getPendingApprovals surfaces reason/mcpServerName/provider for a connect_required suspension', async () => {
+ it('getPendingApprovals surfaces reason/mcpServerName for a connect_required suspension', async () => {
const approval = buildConnectRequiredApproval(
{ id: 'tc_connect', name: 'monday__list_boards', arguments: { limit: 5 } },
- { mcpServerName: 'monday', provider: 'monday' }
+ { mcpServerName: 'monday' }
)
;(runToolUseLoop as ReturnType<typeof vi.fn>).mockResolvedValueOnce({
type: 'need_approval',
@@ -156,8 +156,8 @@ describe('AgentStateMachine -- concurrent execution', () => {
expect(pending[0]).toMatchObject({
reason: 'connect_required',
mcpServerName: 'monday',
- provider: 'monday',
})
+ expect(pending[0]).not.toHaveProperty('provider')
})
it('getPendingApprovals leaves a generic approval free of connect fields (back-compat)', async () => {
@@ -186,7 +186,7 @@ describe('AgentStateMachine -- concurrent execution', () => {
it('emits tool:approval_needed carrying the connect_required discriminator', async () => {
const approval = buildConnectRequiredApproval(
{ id: 'tc_connect', name: 'monday__list_boards', arguments: { limit: 5 } },
- { mcpServerName: 'monday', provider: 'monday' }
+ { mcpServerName: 'monday' }
)
;(runToolUseLoop as ReturnType<typeof vi.fn>).mockResolvedValueOnce({
type: 'need_approval',
@@ -203,8 +203,8 @@ describe('AgentStateMachine -- concurrent execution', () => {
expect(events[0].data).toMatchObject({
reason: 'connect_required',
mcpServerName: 'monday',
- provider: 'monday',
})
+ expect(events[0].data).not.toHaveProperty('provider')
})
it('should resolve approval by requestId and resume execution', async () => {
diff --git a/mcp-host/src/agent/__tests__/taskExecutor.test.ts b/mcp-host/src/agent/__tests__/taskExecutor.test.ts
index 8d5d9a545..fe21fcc95 100644
--- a/mcp-host/src/agent/__tests__/taskExecutor.test.ts
+++ b/mcp-host/src/agent/__tests__/taskExecutor.test.ts
@@ -935,7 +935,7 @@ describe('TaskExecutor', () => {
name: 'monday__list_boards',
content: 'MCP server monday auth failed (401)',
is_error: true,
- metadata: { connect_required: { mcpServerName: 'monday', provider: 'monday' } },
+ metadata: { connect_required: { mcpServerName: 'monday' } },
})
// Second resume (user connected) → the SAME tool now succeeds.
.mockResolvedValueOnce({
@@ -960,7 +960,6 @@ describe('TaskExecutor', () => {
expect(connectCall?.[2]).toMatchObject({
reason: 'connect_required',
mcpServerName: 'monday',
- provider: 'monday',
tool_name: 'monday__list_boards',
tool_call_id: 'tc_1',
})
diff --git a/mcp-host/src/agent/stateMachine.ts b/mcp-host/src/agent/stateMachine.ts
index 1e8154c62..924be030f 100644
--- a/mcp-host/src/agent/stateMachine.ts
+++ b/mcp-host/src/agent/stateMachine.ts
@@ -73,11 +73,10 @@ export interface PendingApprovalInfo {
since: string
// U5 — suspension discriminator, mirrored from the underlying PendingApproval
// so the polling projections match the SSE `suspended` event. Absent reason ⇒
- // generic HITL approval (back-compat). mcpServerName/provider set iff
+ // generic HITL approval (back-compat). mcpServerName set iff
// reason==='connect_required' (oauth connect flow).
reason?: 'approval_required' | 'connect_required'
mcpServerName?: string
- provider?: string
}
/**
@@ -919,16 +918,13 @@ export class AgentStateMachine extends EventEmitter {
since: entry?.registeredAt?.toISOString() ?? new Date().toISOString(),
// U5 — thread the connect_required discriminator; omitted for generic
// approvals so the legacy shape is byte-identical (back-compat).
- // mcpServerName/provider ride ONLY connect_required, matching the SSE
+ // mcpServerName rides ONLY connect_required, matching the SSE
// producer and the other polling projections (no stray field on a
// corrupt/legacy row whose reason normalized away).
...(approval.reason ? { reason: approval.reason } : {}),
...(approval.reason === 'connect_required' && approval.mcpServerName
? { mcpServerName: approval.mcpServerName }
: {}),
- ...(approval.reason === 'connect_required' && approval.provider
- ? { provider: approval.provider }
- : {}),
})
}
}
@@ -1001,15 +997,12 @@ export class AgentStateMachine extends EventEmitter {
// reconstructs the connect suspension, matching the SSE `suspended` event.
// Omitted for generic approvals (back-compat).
...(approval.reason ? { reason: approval.reason } : {}),
- // mcpServerName/provider ride ONLY the connect_required discriminator, matching
+ // mcpServerName rides ONLY the connect_required discriminator, matching
// the SSE producer (sseProgressReporter) — so corrupt/legacy rows can never emit
// a stray field without its reason.
...(approval.reason === 'connect_required' && approval.mcpServerName
? { mcpServerName: approval.mcpServerName }
: {}),
- ...(approval.reason === 'connect_required' && approval.provider
- ? { provider: approval.provider }
- : {}),
})
}
diff --git a/mcp-host/src/agent/taskExecutor.ts b/mcp-host/src/agent/taskExecutor.ts
index 7034c8ee4..77c1b4e85 100644
--- a/mcp-host/src/agent/taskExecutor.ts
+++ b/mcp-host/src/agent/taskExecutor.ts
@@ -978,7 +978,7 @@ export class TaskExecutor {
}
const reporter = progressReporterRegistry.get(this.taskId)
if (reporter) {
- // U5 — carry the reason (+ mcpServerName/provider for connect_required)
+ // U5 — carry the reason (+ mcpServerName for connect_required)
// so the desktop distinguishes an OAuth-consent suspension from the
// default HITL gate. Absent reason → 'approval_required' (back-compat).
reporter.emitSuspended(
@@ -987,7 +987,6 @@ export class TaskExecutor {
{
reason: result.approval.reason ?? 'approval_required',
mcpServerName: result.approval.mcpServerName,
- provider: result.approval.provider,
}
)
}
diff --git a/mcp-host/src/core/adapters/__tests__/toolRegistryAdapter.test.ts b/mcp-host/src/core/adapters/__tests__/toolRegistryAdapter.test.ts
index e516938de..389c15cc8 100644
--- a/mcp-host/src/core/adapters/__tests__/toolRegistryAdapter.test.ts
+++ b/mcp-host/src/core/adapters/__tests__/toolRegistryAdapter.test.ts
@@ -150,7 +150,7 @@ describe('McpToolRegistryAdapter', () => {
toolName: 'monday-server__list_boards',
result: { error: 'MCP server monday-server auth failed (401)' },
isError: true,
- connectRequired: { mcpServerName: 'monday-server', provider: 'monday' },
+ connectRequired: { mcpServerName: 'monday-server' },
})),
} as any
@@ -161,7 +161,7 @@ describe('McpToolRegistryAdapter', () => {
const output = await tool!.execute({})
// The consumer observes the typed metadata marker, not an opaque error.
expect(output.metadata).toEqual({
- connect_required: { mcpServerName: 'monday-server', provider: 'monday' },
+ connect_required: { mcpServerName: 'monday-server' },
})
expect(output.is_error).toBe(true)
})
diff --git a/mcp-host/src/core/adapters/toolRegistryAdapter.ts b/mcp-host/src/core/adapters/toolRegistryAdapter.ts
index 52ebe6e8f..d2a3fe4dd 100644
--- a/mcp-host/src/core/adapters/toolRegistryAdapter.ts
+++ b/mcp-host/src/core/adapters/toolRegistryAdapter.ts
@@ -155,7 +155,6 @@ class McpToolAdapter implements Tool {
? {
connect_required: {
mcpServerName: result.connectRequired.mcpServerName,
- provider: result.connectRequired.provider,
},
}
: undefined,
diff --git a/mcp-host/src/core/conversation/conversationStore.ts b/mcp-host/src/core/conversation/conversationStore.ts
index d4ecdd88e..591210c82 100644
--- a/mcp-host/src/core/conversation/conversationStore.ts
+++ b/mcp-host/src/core/conversation/conversationStore.ts
@@ -86,13 +86,10 @@ export interface ConversationSessionSummary {
chatId: string
state: ConversationState
activeTaskId?: string
- // U5 — includes the connect_required discriminator (reason/mcpServerName/provider)
+ // U5 — includes the connect_required discriminator (reason/mcpServerName)
// so the REST rejoin snapshot lets the desktop rebuild a "Connect <server>"
// suspension, not a generic approval. Absent reason ⇒ generic approval.
- pendingApproval?: Pick<
- PendingApproval,
- 'request_id' | 'tool_name' | 'reason' | 'mcpServerName' | 'provider'
- >
+ pendingApproval?: Pick<PendingApproval, 'request_id' | 'tool_name' | 'reason' | 'mcpServerName'>
turnCount: number
messageCount: number
lastActivityAt: Date
@@ -175,7 +172,6 @@ function sessionMessagesFromConversation(
tool_name: conversation.pending_approval.tool_name,
reason: conversation.pending_approval.reason,
mcpServerName: conversation.pending_approval.mcpServerName,
- provider: conversation.pending_approval.provider,
}
: undefined,
turns,
@@ -412,7 +408,6 @@ export class InMemoryConversationStore implements ConversationStore {
tool_name: conversation.pending_approval.tool_name,
reason: conversation.pending_approval.reason,
mcpServerName: conversation.pending_approval.mcpServerName,
- provider: conversation.pending_approval.provider,
}
: undefined,
turnCount: conversation.turns.length,
diff --git a/mcp-host/src/core/conversation/persistence/__tests__/reconstructConnectRequired.test.ts b/mcp-host/src/core/conversation/persistence/__tests__/reconstructConnectRequired.test.ts
index c316a59ca..a4ca379bf 100644
--- a/mcp-host/src/core/conversation/persistence/__tests__/reconstructConnectRequired.test.ts
+++ b/mcp-host/src/core/conversation/persistence/__tests__/reconstructConnectRequired.test.ts
@@ -5,7 +5,7 @@
* degrading into a generic approval. This drives a REAL in-memory SQLite DB
* through every migration (incl. 013), inserts a connect_required row via the
* real prepared statement, reads it back via the real select, and reconstructs
- * the PendingApproval — asserting reason/mcpServerName/provider are preserved.
+ * the PendingApproval — asserting reason/mcpServerName are preserved.
*
* The row shape is `PendingApprovalRow`, the exact interface `persistSuspend`
* fills (T1: no ad-hoc fixture standing in for another layer — the DB schema and
@@ -42,12 +42,11 @@ function connectRow(): PendingApprovalRow {
trace_context: null,
reason: 'connect_required',
mcp_server_name: 'monday',
- provider: 'monday',
}
}
describe('U5 — connect_required durable round-trip', () => {
- it('preserves reason/mcpServerName/provider through insert → select → reconstruct', () => {
+ it('preserves reason/mcpServerName through insert → select → reconstruct', () => {
const db = freshDb()
const s = prepareStatements(db)
@@ -62,10 +61,9 @@ describe('U5 — connect_required durable round-trip', () => {
const approval = reconstructPendingApproval(row)
// Observable: the rehydrated suspension is a connect_required, not a generic
- // approval, and it still names the oauth server + provider.
+ // approval, and it still names the oauth server.
expect(approval.reason).toBe('connect_required')
expect(approval.mcpServerName).toBe('monday')
- expect(approval.provider).toBe('monday')
expect(approval.tool_name).toBe('monday__list_boards')
db.close()
})
@@ -86,7 +84,6 @@ describe('U5 — connect_required durable round-trip', () => {
task_id: 'task-2',
reason: null,
mcp_server_name: null,
- provider: null,
}
s.insertPendingApproval.run(legacy)
@@ -95,7 +92,6 @@ describe('U5 — connect_required durable round-trip', () => {
expect(approval.reason).toBeUndefined()
expect(approval.mcpServerName).toBeUndefined()
- expect(approval.provider).toBeUndefined()
db.close()
})
})
diff --git a/mcp-host/src/core/conversation/persistence/reconstruct.ts b/mcp-host/src/core/conversation/persistence/reconstruct.ts
index f06228346..5189a67e8 100644
--- a/mcp-host/src/core/conversation/persistence/reconstruct.ts
+++ b/mcp-host/src/core/conversation/persistence/reconstruct.ts
@@ -148,7 +148,6 @@ export function reconstructPendingApproval(row: PendingApprovalRow): PendingAppr
// NOT degrade a reactive-consent suspension into a generic approval.
reason: normalizeConnectReason(row.reason),
mcpServerName: row.mcp_server_name ?? undefined,
- provider: row.provider ?? undefined,
}
}
diff --git a/mcp-host/src/core/conversation/persistence/sqliteConversationStore.ts b/mcp-host/src/core/conversation/persistence/sqliteConversationStore.ts
index d90eb4158..17772d7fb 100644
--- a/mcp-host/src/core/conversation/persistence/sqliteConversationStore.ts
+++ b/mcp-host/src/core/conversation/persistence/sqliteConversationStore.ts
@@ -396,7 +396,6 @@ export class SqliteConversationStore implements ConversationStore {
tool_name: cached.pending_approval.tool_name,
reason: cached.pending_approval.reason,
mcpServerName: cached.pending_approval.mcpServerName,
- provider: cached.pending_approval.provider,
}
: undefined
: row.pending_approval
@@ -406,7 +405,6 @@ export class SqliteConversationStore implements ConversationStore {
// DB-direct (cold) projection: snake→camel + narrow the reason.
reason: normalizeConnectReason(row.pending_approval.reason),
mcpServerName: row.pending_approval.mcp_server_name ?? undefined,
- provider: row.pending_approval.provider ?? undefined,
}
: undefined,
turnCount: Math.max(0, Math.floor(row.turn_count ?? 0)),
@@ -447,7 +445,6 @@ export class SqliteConversationStore implements ConversationStore {
tool_name: cached.pending_approval.tool_name,
reason: cached.pending_approval.reason,
mcpServerName: cached.pending_approval.mcpServerName,
- provider: cached.pending_approval.provider,
}
: undefined,
turns,
@@ -487,7 +484,6 @@ export class SqliteConversationStore implements ConversationStore {
// DB-direct (cold) projection: snake→camel + narrow the reason.
reason: normalizeConnectReason(page.pending_approval.reason),
mcpServerName: page.pending_approval.mcp_server_name ?? undefined,
- provider: page.pending_approval.provider ?? undefined,
}
: undefined,
turns: groupMessagesIntoTurns(page.messages),
@@ -1020,12 +1016,11 @@ export class SqliteConversationStore implements ConversationStore {
expires_at:
(now + (this.opts.pendingApprovalTtlMs ?? DEFAULT_PENDING_APPROVAL_TTL_MS)) / 1000,
trace_context: approval.traceContext ? JSON.stringify(approval.traceContext) : null,
- // U5 — durable connect_required discriminator + oauth server/provider, so a
+ // U5 — durable connect_required discriminator + oauth server, so a
// cold restart rehydrates the reactive-consent suspension (never a generic
// approval). NULL for the default HITL gate.
reason: approval.reason ?? null,
mcp_server_name: approval.mcpServerName ?? null,
- provider: approval.provider ?? null,
}
await this.persistQueue.enqueueSync(
{ kind: 'insert_pending_approval', payload: row },
diff --git a/mcp-host/src/core/extensions/__tests__/connectRequiredApproval.test.ts b/mcp-host/src/core/extensions/__tests__/connectRequiredApproval.test.ts
index fc59ef5f1..b3ac20243 100644
--- a/mcp-host/src/core/extensions/__tests__/connectRequiredApproval.test.ts
+++ b/mcp-host/src/core/extensions/__tests__/connectRequiredApproval.test.ts
@@ -11,15 +11,17 @@ describe('extractConnectRequiredMarker', () => {
it('reads a well-formed marker', () => {
expect(
extractConnectRequiredMarker({
- connect_required: { mcpServerName: 'monday', provider: 'monday' },
+ connect_required: { mcpServerName: 'monday' },
})
- ).toEqual({ mcpServerName: 'monday', provider: 'monday' })
+ ).toEqual({ mcpServerName: 'monday' })
})
- it('provider is optional', () => {
+ it('projects only mcpServerName, dropping any extra fields', () => {
expect(
- extractConnectRequiredMarker({ connect_required: { mcpServerName: 'clickup' } })
- ).toEqual({ mcpServerName: 'clickup', provider: undefined })
+ extractConnectRequiredMarker({
+ connect_required: { mcpServerName: 'clickup', provider: 'x' },
+ })
+ ).toEqual({ mcpServerName: 'clickup' })
})
it('returns null for absent/malformed markers (no server → no suspension)', () => {
@@ -27,7 +29,7 @@ describe('extractConnectRequiredMarker', () => {
expect(extractConnectRequiredMarker({})).toBeNull()
expect(extractConnectRequiredMarker({ connect_required: null })).toBeNull()
expect(extractConnectRequiredMarker({ connect_required: {} })).toBeNull()
- expect(extractConnectRequiredMarker({ connect_required: { provider: 'monday' } })).toBeNull()
+ expect(extractConnectRequiredMarker({ connect_required: { foo: 'bar' } })).toBeNull()
expect(extractConnectRequiredMarker({ connect_required: [] })).toBeNull()
})
})
@@ -36,11 +38,10 @@ describe('buildConnectRequiredApproval', () => {
it('builds a connect_required PendingApproval carrying the tool coordinates', () => {
const approval = buildConnectRequiredApproval(
{ id: 'call-1', name: 'monday__list_boards', arguments: { limit: 5 } },
- { mcpServerName: 'monday', provider: 'monday' }
+ { mcpServerName: 'monday' }
)
expect(approval.reason).toBe('connect_required')
expect(approval.mcpServerName).toBe('monday')
- expect(approval.provider).toBe('monday')
expect(approval.tool_name).toBe('monday__list_boards')
expect(approval.tool_call_id).toBe('call-1')
expect(approval.parameters).toEqual({ limit: 5 })
diff --git a/mcp-host/src/core/extensions/mcpApprovalGateController.ts b/mcp-host/src/core/extensions/mcpApprovalGateController.ts
index f5e65e0f4..f3427708d 100644
--- a/mcp-host/src/core/extensions/mcpApprovalGateController.ts
+++ b/mcp-host/src/core/extensions/mcpApprovalGateController.ts
@@ -45,7 +45,6 @@ export function getMcpServerPrefix(toolName: string): string | null {
/** Typed `connect_required` marker carried on a tool result's metadata. */
export interface ConnectRequiredMarker {
mcpServerName: string
- provider?: string
}
/**
@@ -64,15 +63,14 @@ export function extractConnectRequiredMarker(
const marker = raw as Record<string, unknown>
const mcpServerName = typeof marker.mcpServerName === 'string' ? marker.mcpServerName : undefined
if (!mcpServerName) return null
- const provider = typeof marker.provider === 'string' ? marker.provider : undefined
- return { mcpServerName, provider }
+ return { mcpServerName }
}
/**
* Build a durable `connect_required` suspension for a tool call whose live
* execution surfaced a 401 on an oauth mcp-server (spec §U5). Reuses the SAME
* `PendingApproval` machinery as the HITL gate; `reason='connect_required'` +
- * `mcpServerName`/`provider` steer the desktop connect UI and are persisted so a
+ * `mcpServerName` steers the desktop connect UI and is persisted so a
* cold restart never degrades this into a generic approval. The caller fills in
* `context_snapshot`/`completed_results`/`intent_summary` so the resume path
* re-executes the SAME tool once the user connects.
@@ -92,7 +90,6 @@ export function buildConnectRequiredApproval(
context_snapshot: [],
reason: 'connect_required',
mcpServerName: marker.mcpServerName,
- provider: marker.provider,
}
}
diff --git a/mcp-host/src/core/orchestration/__tests__/toolCallBridge.test.ts b/mcp-host/src/core/orchestration/__tests__/toolCallBridge.test.ts
index 7a190acb5..d384cf10a 100644
--- a/mcp-host/src/core/orchestration/__tests__/toolCallBridge.test.ts
+++ b/mcp-host/src/core/orchestration/__tests__/toolCallBridge.test.ts
@@ -158,7 +158,7 @@ class ConnectRequiredTool implements Tool {
content: 'MCP server monday auth failed (401)',
duration_ms: 1,
is_error: true,
- metadata: { connect_required: { mcpServerName: 'monday', provider: 'monday' } },
+ metadata: { connect_required: { mcpServerName: 'monday' } },
}
}
}
@@ -182,7 +182,6 @@ describe('U5 — connect_required inline suspension (auto-approved / cron path)'
expect(pendingApproval).toMatchObject({
reason: 'connect_required',
mcpServerName: 'monday',
- provider: 'monday',
tool_name: 'monday__list_boards',
tool_call_id: 'call-1',
})
diff --git a/mcp-host/src/core/types.ts b/mcp-host/src/core/types.ts
index f5048d0d0..c5b309b4b 100644
--- a/mcp-host/src/core/types.ts
+++ b/mcp-host/src/core/types.ts
@@ -511,8 +511,6 @@ export interface PendingApproval {
reason?: 'approval_required' | 'connect_required'
/** U5 — the oauth mcp-server to connect. Set iff reason==='connect_required'. */
mcpServerName?: string
- /** U5 — the OAuth provider (enum) for the connect UI. Set iff reason==='connect_required'. */
- provider?: string
}
// ─── Loop Types ─────────────────────────────────────────────
diff --git a/mcp-host/src/db/migrations/013-pending-approval-connect.ts b/mcp-host/src/db/migrations/013-pending-approval-connect.ts
index 2c0d28a0d..78afff4fc 100644
--- a/mcp-host/src/db/migrations/013-pending-approval-connect.ts
+++ b/mcp-host/src/db/migrations/013-pending-approval-connect.ts
@@ -3,7 +3,7 @@
*
* A reactive OAuth-consent suspension (`reason='connect_required'`) must survive
* a cold restart WITHOUT degrading into a generic approval. These nullable
- * columns carry the discriminator + the oauth server/provider so
+ * columns carry the discriminator + the oauth server to connect so
* `reconstructPendingApproval` rebuilds the right kind of suspension. NULL for
* every existing/legacy row and for the default HITL gate (absent reason ⇒
* 'approval_required').
@@ -26,15 +26,9 @@ export function up(db: Database): void {
if (!hasColumn(db, 'mcp_server_name')) {
db.exec('ALTER TABLE pending_approvals ADD COLUMN mcp_server_name TEXT;')
}
- if (!hasColumn(db, 'provider')) {
- db.exec('ALTER TABLE pending_approvals ADD COLUMN provider TEXT;')
- }
}
export function down(db: Database): void {
- if (hasColumn(db, 'provider')) {
- db.exec('ALTER TABLE pending_approvals DROP COLUMN provider;')
- }
if (hasColumn(db, 'mcp_server_name')) {
db.exec('ALTER TABLE pending_approvals DROP COLUMN mcp_server_name;')
}
diff --git a/mcp-host/src/db/statements.ts b/mcp-host/src/db/statements.ts
index fb5f380af..21004ba90 100644
--- a/mcp-host/src/db/statements.ts
+++ b/mcp-host/src/db/statements.ts
@@ -273,7 +273,6 @@ export function prepareStatements(db: Database): PreparedStatements {
pa.tool_name,
pa.reason,
pa.mcp_server_name,
- pa.provider,
ROW_NUMBER() OVER (
PARTITION BY pa.session_id
ORDER BY pa.registered_at ASC, pa.request_id ASC
@@ -287,8 +286,7 @@ export function prepareStatements(db: Database): PreparedStatements {
pa.request_id AS pending_request_id,
pa.tool_name AS pending_tool_name,
pa.reason AS pending_reason,
- pa.mcp_server_name AS pending_mcp_server_name,
- pa.provider AS pending_provider
+ pa.mcp_server_name AS pending_mcp_server_name
FROM scoped_sessions s
LEFT JOIN ranked_approvals pa
ON pa.session_id = s.id
@@ -392,12 +390,12 @@ export function prepareStatements(db: Database): PreparedStatements {
request_id, session_id, task_id, tool_name, tool_call_id,
parameters, description, context_snapshot, completed_results,
intent_summary, source_message, registered_at, expires_at, trace_context,
- reason, mcp_server_name, provider
+ reason, mcp_server_name
) VALUES (
@request_id, @session_id, @task_id, @tool_name, @tool_call_id,
@parameters, @description, @context_snapshot, @completed_results,
@intent_summary, @source_message, @registered_at, @expires_at, @trace_context,
- @reason, @mcp_server_name, @provider
+ @reason, @mcp_server_name
)
ON CONFLICT(request_id) DO UPDATE SET
task_id = excluded.task_id,
diff --git a/mcp-host/src/db/worker/__tests__/dispatcher.test.ts b/mcp-host/src/db/worker/__tests__/dispatcher.test.ts
index d48d8ea59..d5f60f479 100644
--- a/mcp-host/src/db/worker/__tests__/dispatcher.test.ts
+++ b/mcp-host/src/db/worker/__tests__/dispatcher.test.ts
@@ -633,7 +633,6 @@ describe('dbWorker dispatcher', () => {
trace_context: null,
reason: null,
mcp_server_name: null,
- provider: null,
}
await dispatch({ kind: 'insert_pending_approval', payload: approvalRow }, deps)
const rows = (await dispatch({ kind: 'load_all_pending_approvals' }, deps)) as Array<{
@@ -673,7 +672,6 @@ describe('dbWorker dispatcher', () => {
trace_context: null,
reason: 'connect_required',
mcp_server_name: 'monday',
- provider: 'monday',
},
},
deps
@@ -689,8 +687,8 @@ describe('dbWorker dispatcher', () => {
tool_name: 'monday__list_boards',
reason: 'connect_required',
mcp_server_name: 'monday',
- provider: 'monday',
})
+ expect(page.pending_approval).not.toHaveProperty('provider')
// Cold path B — the session-list summary projection (narrow SELECT).
const summaries = (await dispatch(
@@ -707,8 +705,8 @@ describe('dbWorker dispatcher', () => {
tool_name: 'monday__list_boards',
reason: 'connect_required',
mcp_server_name: 'monday',
- provider: 'monday',
})
+ expect(summaries[0].pending_approval).not.toHaveProperty('provider')
})
it('selects the earliest pending approval consistently for one session', async () => {
@@ -744,7 +742,6 @@ describe('dbWorker dispatcher', () => {
trace_context: null,
reason: null,
mcp_server_name: null,
- provider: null,
},
},
deps
@@ -799,7 +796,6 @@ describe('dbWorker dispatcher', () => {
trace_context: null,
reason: null,
mcp_server_name: null,
- provider: null,
},
},
deps
diff --git a/mcp-host/src/db/worker/dispatcher.ts b/mcp-host/src/db/worker/dispatcher.ts
index 60fe46738..d4cac5fa3 100644
--- a/mcp-host/src/db/worker/dispatcher.ts
+++ b/mcp-host/src/db/worker/dispatcher.ts
@@ -626,7 +626,6 @@ export async function dispatch(op: WorkerOp, deps: DispatcherDeps): Promise<unkn
tool_name: pendingRow.tool_name,
reason: pendingRow.reason,
mcp_server_name: pendingRow.mcp_server_name,
- provider: pendingRow.provider,
}
: null,
total_turns: sessionRow.turn_count ?? 0,
@@ -681,7 +680,6 @@ export async function dispatch(op: WorkerOp, deps: DispatcherDeps): Promise<unkn
pending_tool_name: string | null
pending_reason: string | null
pending_mcp_server_name: string | null
- pending_provider: string | null
}
>
return rows.map(row => {
@@ -692,7 +690,6 @@ export async function dispatch(op: WorkerOp, deps: DispatcherDeps): Promise<unkn
pending_tool_name,
pending_reason,
pending_mcp_server_name,
- pending_provider,
...session
} = row
return {
@@ -706,7 +703,6 @@ export async function dispatch(op: WorkerOp, deps: DispatcherDeps): Promise<unkn
tool_name: pending_tool_name,
reason: pending_reason,
mcp_server_name: pending_mcp_server_name,
- provider: pending_provider,
}
: null,
} satisfies PersistedSessionSummary
diff --git a/mcp-host/src/db/worker/protocol.ts b/mcp-host/src/db/worker/protocol.ts
index b49286312..d7449e472 100644
--- a/mcp-host/src/db/worker/protocol.ts
+++ b/mcp-host/src/db/worker/protocol.ts
@@ -102,8 +102,6 @@ export interface PendingApprovalRow {
reason: string | null
/** U5 (migration 013) — oauth mcp-server to connect (reason='connect_required'). */
mcp_server_name: string | null
- /** U5 (migration 013) — OAuth provider for the connect UI (reason='connect_required'). */
- provider: string | null
}
export interface SessionCountersUpdate {
@@ -133,7 +131,7 @@ export interface PersistedSessionSummary {
// suspension into a generic approval.
pending_approval: Pick<
PendingApprovalRow,
- 'request_id' | 'tool_name' | 'reason' | 'mcp_server_name' | 'provider'
+ 'request_id' | 'tool_name' | 'reason' | 'mcp_server_name'
> | null
}
@@ -142,7 +140,7 @@ export interface PersistedSessionMessagePage {
messages: MessageRow[]
pending_approval: Pick<
PendingApprovalRow,
- 'request_id' | 'tool_name' | 'reason' | 'mcp_server_name' | 'provider'
+ 'request_id' | 'tool_name' | 'reason' | 'mcp_server_name'
> | null
total_turns: number
first_turn_number: number | null
diff --git a/mcp-host/src/main.ts b/mcp-host/src/main.ts
index f042a1034..bdb65d5a2 100644
--- a/mcp-host/src/main.ts
+++ b/mcp-host/src/main.ts
@@ -2014,13 +2014,10 @@ async function handleTaskResult(
// reconnecting desktop rebuilds a "Connect <server>" suspension, not a
// generic approval. Omitted for generic approvals (back-compat).
...(result.approval.reason ? { reason: result.approval.reason } : {}),
- // mcpServerName/provider ride ONLY connect_required, matching the SSE producer.
+ // mcpServerName rides ONLY connect_required, matching the SSE producer.
...(result.approval.reason === 'connect_required' && result.approval.mcpServerName
? { mcpServerName: result.approval.mcpServerName }
: {}),
- ...(result.approval.reason === 'connect_required' && result.approval.provider
- ? { provider: result.approval.provider }
- : {}),
},
model: result.model,
}
diff --git a/mcp-host/src/mcp/__tests__/managerConnectRequired.test.ts b/mcp-host/src/mcp/__tests__/managerConnectRequired.test.ts
index eadb32266..fc582e5ee 100644
--- a/mcp-host/src/mcp/__tests__/managerConnectRequired.test.ts
+++ b/mcp-host/src/mcp/__tests__/managerConnectRequired.test.ts
@@ -3,13 +3,13 @@
*
* Invariants pinned here (spec §U5 must-fix):
* - 401 on an oauth server → typed `connectRequired` marker carrying
- * `mcpServerName`, NOT a flattened opaque error. The marker's `provider` is
- * always undefined here because HCC v2 never forwards the OAuth provider to
- * mcp-host: `decodeMcpServer` (the sole producer of `McpServerInfo`) emits
- * `authKind` and never an `oauth` block, so `info.oauth?.provider` in the
- * gate resolves to undefined. The connect UI keys the consent flow off
- * `mcpServerName` and resolves the provider server-side (control-api), so the
- * absent `provider` is dead-but-harmless. See the `oauthUserServer` fixture.
+ * `mcpServerName` ONLY, NOT a flattened opaque error. The marker no longer
+ * declares an OAuth `provider`: HCC v2 never forwards it to mcp-host
+ * (`decodeMcpServer`, the sole producer of `McpServerInfo`, emits `authKind`
+ * and never an `oauth` block), and no consumer read it — the connect UI keys
+ * the consent flow off `mcpServerName` and resolves the provider server-side
+ * (control-api). The dead field was pruned from the whole U5 chain. See the
+ * `oauthUserServer` fixture.
* - 403 on an oauth server → TERMINAL: plain error, NO connectRequired marker.
* - 401 on a static (non-oauth) server → NO connectRequired marker (only oauth
* has a consent flow).
@@ -104,7 +104,7 @@ beforeEach(() => {
})
describe('manager.callTool — U5 reactive consent classification', () => {
- it('401 on an oauth server → typed connect_required marker (mcpServerName; provider undefined under HCC v2)', async () => {
+ it('401 on an oauth server → typed connect_required marker (mcpServerName only)', async () => {
const manager = new McpManager(undefined, undefined, tokenFactory())
await manager.addServer(oauthUserServer('monday'))
@@ -113,9 +113,9 @@ describe('manager.callTool — U5 reactive consent classification', () => {
const result = await manager.callTool('monday__do', {}, { userId: 'alice' })
expect(result.isError).toBe(true)
- // provider is undefined by design: HCC v2 forwards only authKind, never the
- // OAuth provider, so the gate's `info.oauth?.provider` resolves to undefined.
- expect(result.connectRequired).toEqual({ mcpServerName: 'monday', provider: undefined })
+ // The marker carries ONLY the mcpServerName: HCC v2 forwards only authKind,
+ // never the OAuth provider, so the marker no longer declares a provider field.
+ expect(result.connectRequired).toEqual({ mcpServerName: 'monday' })
})
it('403 on an oauth server → terminal, NO connect_required marker', async () => {
diff --git a/mcp-host/src/mcp/manager.ts b/mcp-host/src/mcp/manager.ts
index 860877a58..478c0fb8c 100644
--- a/mcp-host/src/mcp/manager.ts
+++ b/mcp-host/src/mcp/manager.ts
@@ -858,7 +858,7 @@ export class McpManager {
toolName: fullToolName,
result: { error: error.message },
isError: true,
- connectRequired: { mcpServerName: serverName, provider: info.oauth?.provider },
+ connectRequired: { mcpServerName: serverName },
}
}
return {
diff --git a/mcp-host/src/messageHandler.ts b/mcp-host/src/messageHandler.ts
index 8a3a901d4..c29fd344a 100644
--- a/mcp-host/src/messageHandler.ts
+++ b/mcp-host/src/messageHandler.ts
@@ -50,7 +50,6 @@ export interface PendingTaskEntry {
// generic approval (back-compat).
reason?: 'approval_required' | 'connect_required'
mcpServerName?: string
- provider?: string
}
}
@@ -65,19 +64,17 @@ export interface PendingTaskEntry {
function connectApprovalFields(data: Record<string, unknown>): {
reason?: 'approval_required' | 'connect_required'
mcpServerName?: string
- provider?: string
} {
const reason = data.reason as 'approval_required' | 'connect_required' | undefined
const isConnect = reason === 'connect_required'
return {
...(reason ? { reason } : {}),
- // mcpServerName/provider ride ONLY connect_required, matching the SSE producer.
+ // mcpServerName rides ONLY connect_required, matching the SSE producer.
// Runtime typeof guard: never pass a non-string through the blind cast even if
// an upstream contract ever regressed.
...(isConnect && typeof data.mcpServerName === 'string'
? { mcpServerName: data.mcpServerName }
: {}),
- ...(isConnect && typeof data.provider === 'string' ? { provider: data.provider } : {}),
}
}
diff --git a/mcp-host/src/progress/__tests__/sseProgressReporter.test.ts b/mcp-host/src/progress/__tests__/sseProgressReporter.test.ts
index 34f835cd2..53d585c5f 100644
--- a/mcp-host/src/progress/__tests__/sseProgressReporter.test.ts
+++ b/mcp-host/src/progress/__tests__/sseProgressReporter.test.ts
@@ -151,7 +151,7 @@ describe('SseProgressReporter', () => {
})
})
- it('U5: emitSuspended with connect_required carries reason + mcpServerName + provider', () => {
+ it('U5: emitSuspended with connect_required carries reason + mcpServerName', () => {
const reporter = new SseProgressReporter('task-1', undefined, NoopSafety)
const received: ProgressEvent[] = []
reporter.subscribe(e => received.push(e))
@@ -159,7 +159,6 @@ describe('SseProgressReporter', () => {
reporter.emitSuspended('Monday', 'req-connect', {
reason: 'connect_required',
mcpServerName: 'monday',
- provider: 'monday',
})
expect(received).toHaveLength(1)
@@ -171,7 +170,6 @@ describe('SseProgressReporter', () => {
displayName: 'Monday',
reason: 'connect_required',
mcpServerName: 'monday',
- provider: 'monday',
},
})
})
diff --git a/mcp-host/src/progress/sseProgressReporter.ts b/mcp-host/src/progress/sseProgressReporter.ts
index d74b32b5e..e7637a802 100644
--- a/mcp-host/src/progress/sseProgressReporter.ts
+++ b/mcp-host/src/progress/sseProgressReporter.ts
@@ -159,14 +159,13 @@ export class SseProgressReporter implements ProgressReporter {
// P1-1: takes only the server-derived displayName (not the raw tool_name).
// U5: `options` is ADDITIVE — absent → the legacy 'approval_required' gate,
// byte-identical to before. reason==='connect_required' carries the oauth
- // mcpServerName/provider so the desktop can open the connect flow.
+ // mcpServerName so the desktop can open the connect flow.
emitSuspended(
displayName: string,
requestId: string,
options?: {
reason?: 'approval_required' | 'connect_required'
mcpServerName?: string
- provider?: string
}
): void {
if (this.completed) return
@@ -174,7 +173,6 @@ export class SseProgressReporter implements ProgressReporter {
const data: SuspendedEvent = { taskId: this.taskId, requestId, displayName, reason }
if (reason === 'connect_required') {
if (options?.mcpServerName) data.mcpServerName = options.mcpServerName
- if (options?.provider) data.provider = options.provider
}
const event: ProgressEvent = { type: 'suspended', data }
// P1: store the exact redacted payload we publish live so late/re-connected
diff --git a/mcp-host/src/progress/types.ts b/mcp-host/src/progress/types.ts
index 5700f8f1d..97a7a1015 100644
--- a/mcp-host/src/progress/types.ts
+++ b/mcp-host/src/progress/types.ts
@@ -106,8 +106,6 @@ export interface SuspendedEvent {
reason: 'approval_required' | 'connect_required'
/** Set iff reason==='connect_required' — the oauth mcp-server to connect. */
mcpServerName?: string
- /** Set iff reason==='connect_required' — the OAuth provider for the connect UI. */
- provider?: string
}
/**
diff --git a/mcp-host/src/server/__tests__/sessionRouteHandlers.test.ts b/mcp-host/src/server/__tests__/sessionRouteHandlers.test.ts
index 0afd26907..6bc90b992 100644
--- a/mcp-host/src/server/__tests__/sessionRouteHandlers.test.ts
+++ b/mcp-host/src/server/__tests__/sessionRouteHandlers.test.ts
@@ -31,7 +31,7 @@ async function suspendConnectRequired(
await convManager.startTurn(conv, 'list boards', 'task-connect')
const approval = buildConnectRequiredApproval(
{ id: 'tc_1', name: 'monday__list_boards', arguments: { limit: 5 } },
- { mcpServerName: 'monday', provider: 'monday' }
+ { mcpServerName: 'monday' }
)
await convManager.suspendForApproval(conv, approval)
}
@@ -53,7 +53,7 @@ async function suspendGenericApproval(
}
describe('createSessionRouteHandlers — U5 connect_required projection on the rejoin snapshot', () => {
- it('handleSessionMessages surfaces reason/mcpServerName/provider for a connect_required suspension', async () => {
+ it('handleSessionMessages surfaces reason/mcpServerName for a connect_required suspension', async () => {
const { convManager, handleSessionMessages } = makeHandlersUnderTest()
await suspendConnectRequired(convManager, 'user-A:rpc:agent-x:chat-1')
@@ -63,8 +63,8 @@ describe('createSessionRouteHandlers — U5 connect_required projection on the r
expect(page?.pendingApproval).toMatchObject({
reason: 'connect_required',
mcpServerName: 'monday',
- provider: 'monday',
})
+ expect(page?.pendingApproval).not.toHaveProperty('provider')
})
it('handleSessionsList surfaces the connect_required discriminator on the summary', async () => {
@@ -76,8 +76,8 @@ describe('createSessionRouteHandlers — U5 connect_required projection on the r
expect(item?.pendingApproval).toMatchObject({
reason: 'connect_required',
mcpServerName: 'monday',
- provider: 'monday',
})
+ expect(item?.pendingApproval).not.toHaveProperty('provider')
})
it('a generic approval projects WITHOUT the connect fields (back-compat)', async () => {
diff --git a/mcp-host/src/server/sessionRouteHandlers.ts b/mcp-host/src/server/sessionRouteHandlers.ts
index 90e970925..46b2c989a 100644
--- a/mcp-host/src/server/sessionRouteHandlers.ts
+++ b/mcp-host/src/server/sessionRouteHandlers.ts
@@ -58,7 +58,6 @@ export function createSessionRouteHandlers(deps: SessionRouteHandlerDeps) {
// the default HITL gate (reason undefined ⇒ fields omitted).
...(approval.reason ? { reason: approval.reason } : {}),
...(approval.mcpServerName ? { mcpServerName: approval.mcpServerName } : {}),
- ...(approval.provider ? { provider: approval.provider } : {}),
}
: undefined
// Lifetime token totals — projected to the wire shape (omitted until the
diff --git a/mcp-host/src/server/types.ts b/mcp-host/src/server/types.ts
index ad65fb7a6..1d156c6e8 100644
--- a/mcp-host/src/server/types.ts
+++ b/mcp-host/src/server/types.ts
@@ -85,11 +85,10 @@ export interface MessageResponse {
notification: string
// U5 — connect_required discriminator, mirrored from the SSE `suspended`
// event so a REST poll rebuilds the connect suspension. Absent reason ⇒
- // generic approval (back-compat). mcpServerName/provider set iff
+ // generic approval (back-compat). mcpServerName set iff
// reason==='connect_required'.
reason?: 'approval_required' | 'connect_required'
mcpServerName?: string
- provider?: string
}
}
@@ -120,7 +119,6 @@ export interface StatusResponse {
// PendingApproval. Absent reason ⇒ generic approval (back-compat).
reason?: 'approval_required' | 'connect_required'
mcpServerName?: string
- provider?: string
}>
/**
* Per-MCP-server health snapshot (spec §4.2). Omitted by older mcp-host
@@ -494,7 +492,6 @@ export interface SessionStateWire {
// reason ⇒ generic approval (back-compat). Set by `sessionRouteHandlers`.
reason?: 'approval_required' | 'connect_required'
mcpServerName?: string
- provider?: string
}
/** Lifetime token totals; omitted when the session has had no LLM call yet. */
tokens?: SessionTokensWire
diff --git a/mcp-host/src/types.ts b/mcp-host/src/types.ts
index f40b66b6a..99bf64444 100644
--- a/mcp-host/src/types.ts
+++ b/mcp-host/src/types.ts
@@ -256,6 +256,5 @@ export interface ToolCallResult {
*/
connectRequired?: {
mcpServerName: string
- provider?: string
}
}