/** * Source-owned integration restrictions. * * This policy is deliberately monotonic: it can only remove integrations or * tools from the capabilities already granted by the agent source, catalog, * and control-plane policy. It never enables an integration, selects a * credential scope, or grants access on its own. */ import type { IntegrationName } from "./schema.js"; export interface SourceIntegrationRestriction { /** * Exact connector-local tool IDs. Omit to allow every catalog tool for the * listed integration; use an empty array to allow none. */ allowedTools?: readonly string[]; } export interface SourceIntegrationPolicyConfig { /** Integrations that remain eligible after source-policy narrowing. */ readonly allow: Readonly>>; } export type SourceIntegrationPolicyManifest = { readonly schemaVersion: 1; readonly mode: "unrestricted"; } | { readonly schemaVersion: 1; readonly mode: "allowlist"; readonly integrations: Readonly>>; }; /** Return whether a process-boundary value is an exact versioned policy manifest. */ export declare function isSourceIntegrationPolicyManifest(value: unknown): value is SourceIntegrationPolicyManifest; /** Strictly parse and canonicalize a process-boundary policy manifest. */ export declare function parseSourceIntegrationPolicyManifest(value: unknown): SourceIntegrationPolicyManifest; /** Resolve an internal manifest; malformed state narrows to deny-all. */ export declare function resolveSourceIntegrationPolicyManifest(value: unknown): SourceIntegrationPolicyManifest | undefined; /** Build a deterministic manifest from validated `veryfront.config.ts` input. */ export declare function normalizeSourceIntegrationPolicy(config: SourceIntegrationPolicyConfig | undefined): SourceIntegrationPolicyManifest; /** Combine independent restrictions without allowing either one to widen access. */ export declare function intersectSourceIntegrationPolicies(left: SourceIntegrationPolicyManifest, right: SourceIntegrationPolicyManifest): SourceIntegrationPolicyManifest; export interface IntegrationToolIdentity { integration: string; toolId: string; } /** * Parse the canonical API tool name (`integration__tool_id`). Aliases and * alternate separators are intentionally not accepted at this policy layer. */ export declare function parseIntegrationToolIdentity(toolName: string): IntegrationToolIdentity | null; /** Return whether a canonical integration tool survives the source restriction. */ export declare function isIntegrationToolAllowedBySourcePolicy(toolName: string, policy: SourceIntegrationPolicyManifest): boolean; /** Filter canonical tool names while leaving non-integration tools untouched. */ export declare function applySourceIntegrationPolicy(toolNames: readonly string[], policy: SourceIntegrationPolicyManifest): string[]; //# sourceMappingURL=source-policy.d.ts.map