import type { RequestContext } from '@mastra/core/request-context'; import type { ApiRoute } from '@mastra/core/server'; import type { MastraWorker } from '@mastra/core/worker'; import type { RouteAuth } from '../../routes/route.js'; import type { IntakeStorage } from '../../storage/domains/intake/base.js'; import type { FactoryProjectsStorage } from '../../storage/domains/projects/base.js'; import type { FactoryIntegration, IntegrationContext, IntegrationTools } from '../base.js'; import type { IncidentioEventRules, IncidentioRuleOverrides } from './default-rules.js'; export interface IncidentioIntegrationConfig { apiKey?: string; fetchImpl?: typeof fetch; baseUrl?: string; /** Per-event replacements for the default Factory incident.io rules. */ rules?: IncidentioRuleOverrides; } export declare class IncidentioIntegration implements FactoryIntegration { #private; readonly id = "incidentio"; readonly intake: import("../../capabilities/intake.js").Intake; constructor(config?: IncidentioIntegrationConfig); /** Event rules driving automatic follow-up materialization and close handling. */ get rules(): IncidentioEventRules; /** * Bind the projects domain and the host auth seam. incident.io has no * per-org connection rows here — credentials are deployment-global * constructor config. */ initialize({ projects, auth, intake, }: { projects: FactoryProjectsStorage; auth: RouteAuth; intake: IntakeStorage; }): void; /** Cross-integration intake selection/binding domain — agent-tool authorization. */ get intakeStorage(): IntakeStorage; /** Factory projects domain — maps a session's resourceId to its owning org. */ get projects(): FactoryProjectsStorage; /** Whether the host runs with web auth enabled; every surface is inert without it. */ get authEnabled(): boolean; /** * Map a session's resourceId (the factory project id) to its owning org. * Same caching semantics as the Jira integration: definitive misses are * cached, transient database failures are not. */ resolveOrgId(resourceId: string): Promise; /** Test hook: clear the org cache between specs. */ clearCaches(): void; /** * Org-scoped agent tools: the read-only follow-up detail tool for sessions * whose resource is a factory project, matching the Linear/Jira surface. */ agentTools(args: { requestContext: RequestContext; }): Promise; workers(ctx: IntegrationContext): MastraWorker[]; /** * The integration's HTTP surface: `/web/incidentio/*` Mastra `apiRoutes` * (status + follow-up listing/detail for Intake). Handlers operate on this * instance; a board-scoped listing also feeds the incident.io event rules. */ routes(ctx: IntegrationContext): ApiRoute[]; diagnostics(): Record; } //# sourceMappingURL=integration.d.ts.map