mcp-capability.ts 925 B

1234567891011121314151617181920
  1. import type { McpToolEntry } from '@mavis/agent-tools';
  2. import type { LocalMavisMcpAdapter } from '@mavis/agent-tools/desktop';
  3. import type { LocalRuntimeAuthContext } from './model-resolver.js';
  4. import type { LocalRuntimeRoutingContext } from './routing-headers.js';
  5. /** @deprecated Read-only wiring for old turn/Skill consumers; remove after their v2 cutover. */
  6. export interface LocalMcpRuntimeCapability {
  7. isBuiltinMatrixAvailable(): boolean;
  8. readConfiguredServerNames(): Promise<Set<string>>;
  9. createMavisAdapter(
  10. emit: (type: string, payload: Record<string, unknown>) => void,
  11. ): LocalMavisMcpAdapter;
  12. listToolEntriesForTurn(input: {
  13. sessionId: string;
  14. workspaceRoot: string;
  15. authContext?: LocalRuntimeAuthContext;
  16. routingContextGetter?: () => LocalRuntimeRoutingContext | undefined;
  17. emitBusEvent(type: string, payload: Record<string, unknown>): void;
  18. }): Promise<McpToolEntry[]>;
  19. }