Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/mcp/server/miftah-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,7 @@ export class MiftahServer {
}).catch(() => undefined);
}

/** Closes subscriptions, the MCP server, and upstreams while preserving the first shutdown failure. */
async close(): Promise<void> {
this.profileTransitionSession += 1;
this.profileTransitionConfirmations = new WeakMap<object, ProfileTransitionConfirmationBinding>();
Expand Down Expand Up @@ -1053,6 +1054,7 @@ export class MiftahServer {
}
}

/** Resolves an exposed upstream tool, validates its routed target, and executes it through the policy pipeline. */
private async handleUpstreamTool(
name: string,
args: Record<string, unknown>,
Expand Down
1 change: 1 addition & 0 deletions src/mcp/server/operation-pipeline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ export class OperationPipeline {
}
}

/** Throws the safe policy error when the routed operation is blocked by its enforcement decision. */
private assertPolicyAllows(
operation: ProxiedOperation<unknown>,
route: RoutingDecision,
Expand Down