/** * @sh-mcp/shared — public API * * Every package that defines tools imports ONLY from this barrel. * Do NOT import from sub-paths like '@sh-mcp/shared/src/auth'. */ // Types export type { Scope, AuthContext, ToolDef, JSONSchema } from './types.js'; // Registry export { defineTool, ToolRegistry } from './registry.js'; // Auth interface and scope guard export { requireScope, ScopeError } from './auth.js'; export type { AuthProvider } from './auth.js'; // Concrete Cognito auth provider (the 0a-unblocked implementation) export { CognitoAuthProvider, AuthError, cognitoIssuer, cognitoJwks, extractScopes, extractBearerToken, } from './cognito-auth.js'; export type { AuthErrorCode, CognitoAuthConfig, DenyListChecker } from './cognito-auth.js'; // Redaction export { redact, maskValue, REDACTED } from './redact.js'; // OpenAPI generation export { generateOpenAPIPaths, buildOpenApiDocument } from './openapi.js'; export type { OASPathsResult, OASPathItem, OASOperation, OASRequestBody, OASResponse, OASMediaType, OASInfo, OASServer, BuildOpenApiOptions, OpenApiDocument, } from './openapi.js'; // Audit logging export { ConsoleAuditLogger, NoopAuditLogger, MemoryAuditLogger, hashArgs } from './audit.js'; export type { AuditLogger, AuditRecord } from './audit.js'; // Rate limiting export { InMemoryRateLimiter, NoopRateLimiter, RateLimitError } from './rate-limit.js'; export type { RateLimiter, RateLimitConfig } from './rate-limit.js'; // Dispatch — the single authoritative execution path export { executeTool, redactDeep, UnknownToolError, InputValidationError } from './dispatch.js'; export type { DispatchDeps } from './dispatch.js'; // Tool visibility (tool-hiding) export { visibleTools } from './visibility.js'; // Local development auth provider export { LocalAuthProvider, defaultLocalPrincipals, OPS_AUDIENCE, FINANCE_AUDIENCE, } from './local-auth.js'; export type { LocalPrincipal, LocalAuthConfig } from './local-auth.js'; // MCP transport export { createMcpServer } from './mcp.js'; export type { McpServerInfo } from './mcp.js'; // HTTP host (Express app builder) export { createApp } from './http.js'; export type { CreateAppOptions } from './http.js';