import { type HandoffPacketCommandInput, type HandoffPacketCommandResult } from "../lib/onboardClientHandoffPacket.js"; import { type HandoffAuthorizationCommandInput, type HandoffAuthorizationCommandResult, type HandoffAuthorizationProtectedCallback } from "../lib/onboardClientHandoffAuthorization.js"; import { type OnboardClientRuntimeCommandInput, type OnboardClientRuntimeCommandResult, type OnboardClientWorkspaceEffectCalibration } from "./onboardClientRuntimeAdapters.js"; import { type OnboardClientTargetAdapterRuntime, type OnboardClientTargetApproval, type OnboardClientTargetContextRef } from "./onboardClientTargetAdapters.js"; export interface OnboardClientHandoffSourceRecord { resource: "meetings" | "notes" | "tasks"; id: string; } export type OnboardClientHandoffInput = { action?: "status" | "read_association" | HandoffPacketCommandInput["action"] | HandoffAuthorizationCommandInput["action"] | OnboardClientRuntimeCommandInput["action"]; accountId?: string; opportunityId?: string; contactId?: string; sourceRecords?: OnboardClientHandoffSourceRecord[]; expectedRevisions?: Record; runId?: string; associationFingerprint?: string; associationRevisions?: Record; event?: HandoffPacketCommandInput["event"]; packet?: HandoffPacketCommandInput["packet"]; expectedRevision?: number; authority?: HandoffAuthorizationCommandInput["authority"] | { registrationHash: string; approval: OnboardClientTargetApproval; }; previewHash?: string; expectedAuthorizationRevision?: number; approvalEvent?: Record; operation?: string; effectIdentity?: string; requestFingerprint?: string; authorityHash?: string; targetContextRef?: OnboardClientTargetContextRef; sendIntent?: Record; cancellationEvent?: Record; fixtureId?: string; }; export type OnboardClientHandoffRunner = (args: string[]) => Promise; export interface OnboardClientHandoffOptions { runner?: OnboardClientHandoffRunner; adminHome?: string; now?: () => string; protectedCallback?: HandoffAuthorizationProtectedCallback; adminStatePath?: string; workspaceEffectCalibration?: OnboardClientWorkspaceEffectCalibration; targetAdapterRuntime?: OnboardClientTargetAdapterRuntime; } export type AssociationUnavailableCode = "association_reader_unavailable" | "association_input_invalid" | "association_unknown_resource" | "association_runner_timeout" | "association_authentication_failed" | "association_rate_limited" | "association_not_found" | "association_runner_failed" | "association_response_malformed" | "association_exact_find_empty" | "association_ambiguous" | "association_relationship_mismatch" | "association_stale_revision"; interface MinimizedRecord { id: string; revision: string; updatedAt: string; httpLink: string; fields: Record; } interface MinimizedSourceRecord extends MinimizedRecord { resource: OnboardClientHandoffSourceRecord["resource"]; } export type OnboardClientHandoffResult = { ok: true; kind: "onboard_client_handoff_status"; apiUrl: string | null; workspaceId: string | null; lockEnforced: boolean; adminHome: string; adminConfigPath: string; adminStatePath: string; } | { ok: true; kind: "association_authority"; association: { account: MinimizedRecord; opportunity: MinimizedRecord; contact?: MinimizedRecord; sources: MinimizedSourceRecord[]; relationships: { opportunityAccountId: string; opportunityContactIds: string[]; contactAccountId?: string; }; }; associationFingerprint: string; } | { ok: false; kind: "association_unavailable"; code: AssociationUnavailableCode; retryable: false; } | HandoffPacketCommandResult | HandoffAuthorizationCommandResult | OnboardClientRuntimeCommandResult; export declare const onboardClientHandoffToolDefinitions: { name: string; description: string; inputSchema: { type: "object"; additionalProperties: boolean; properties: { action: { type: string; enum: string[]; }; accountId: { type: string; }; opportunityId: { type: string; }; contactId: { type: string; }; sourceRecords: { type: string; maxItems: number; items: { type: string; additionalProperties: boolean; properties: { resource: { type: string; enum: string[]; }; id: { type: string; }; }; required: string[]; }; }; expectedRevisions: { type: string; additionalProperties: { type: string; }; }; runId: { type: string; }; associationFingerprint: { type: string; }; associationRevisions: { type: string; additionalProperties: { type: string; }; }; event: { type: string; }; packet: { type: string; }; expectedRevision: { type: string; minimum: number; }; authority: { type: string; }; previewHash: { type: string; }; expectedAuthorizationRevision: { type: string; minimum: number; }; approvalEvent: { type: string; }; operation: { type: string; }; effectIdentity: { type: string; }; requestFingerprint: { type: string; pattern: string; }; authorityHash: { type: string; pattern: string; }; targetContextRef: { type: string; additionalProperties: boolean; properties: { schemaVersion: { type: string; const: "onboard-client-production-target-context-ref-v1"; }; runId: { type: string; }; lifecycleId: { type: string; }; path: { type: string; pattern: string; }; sha256: { type: string; pattern: string; }; }; required: string[]; }; sendIntent: { type: string; }; cancellationEvent: { type: string; }; fixtureId: { type: string; }; }; required: never[]; }; }[]; export declare function adminOnboardClientHandoff(input?: OnboardClientHandoffInput, options?: OnboardClientHandoffOptions): Promise; export {};