import type { RemoteAgentAuth, RemoteAgentKind } from "../resources/metadata.js"; import { type AgentProfileMetadata } from "../shared/agent-profile.js"; import { isBuiltinAgentCatalogId, normalizeAgentId } from "../shared/first-party-agents.js"; import { type WorkspaceAppAudience } from "../shared/workspace-app-audience.js"; export { isBuiltinAgentCatalogId, normalizeAgentId }; export { readBuiltinAgentsConfig, type BuiltinAgentsConfig, type BuiltinAgentsMode, } from "./builtin-agents.js"; export interface DiscoveredAgent { id: string; name: string; description: string; url: string; color: string; source?: "workspace" | "org-directory" | "remote-agent" | "builtin"; whenToUse?: string[]; aliases?: string[]; cardUrl?: string; auth?: RemoteAgentAuth; kind?: RemoteAgentKind; } export interface DiscoverAgentsOptions { preferLocalUrls?: boolean; requireReadableAgentSources?: boolean; includePersonalAgents?: boolean; } export interface DiscoverOrgDirectoryAgentsOptions { preferLocalUrls?: boolean; /** Filter workspace rows before they can shadow another discoverable source. */ allowedWorkspaceAppIds?: ReadonlySet; } export type OrgDirectoryDiscoveryResult = { status: "available"; agents: DiscoveredAgent[]; } | { status: "unavailable"; reason: "remote-manifests" | "workspace-metadata"; }; export type OrgDirectoryStatus = { status: "available"; } | { status: "unavailable"; reason: string; } | { status: "forbidden"; } | { status: "setup-required"; reason: string; }; export interface DiscoveredAgentsWithDirectoryStatus { agents: DiscoveredAgent[]; directory: OrgDirectoryStatus; } export interface WorkspaceAppMetadataOverride { name?: string; description?: string; whenToUse?: string[]; generated?: boolean; sourcePrompt?: string; updatedAt?: string; updatedBy?: string; } export interface WorkspaceAppMetadataSettings { apps: Record; } export declare const WORKSPACE_APP_METADATA_SETTINGS_KEY = "workspace-app-metadata"; export interface WorkspaceAppManifestEntry { id: string; name: string; description: string; whenToUse?: string[]; aliases?: string[]; path: string; homePath: string; url?: string | null; port?: number; isDispatch?: boolean; audience?: WorkspaceAppAudience; publicPaths?: string[]; protectedPaths?: string[]; } export declare function workspaceAppMetadataSettingsKey(input?: { orgId?: string | null; userEmail?: string | null; }): string | null; export declare function parseWorkspaceAppMetadataSettings(raw: unknown, strict?: boolean): WorkspaceAppMetadataSettings; export declare function readWorkspaceAppMetadataSettings(): Promise; export declare function writeWorkspaceAppMetadataOverride(input: { appId: string; name?: string | null; description?: string | null; whenToUse?: string[] | null; generated?: boolean; sourcePrompt?: string | null; updatedBy?: string | null; }): Promise; export declare function applyWorkspaceAppMetadataOverride(app: T, settings: WorkspaceAppMetadataSettings): T; export declare function getWorkspaceAppProfile(appId: string, identity?: { userEmail?: string | null; orgId?: string | null; }): Promise; export declare function loadWorkspaceAppsManifest(strict?: boolean): Promise; export declare function shouldIncludeRemoteAgentManifest(manifest: { id?: string | null; }, selfAppId?: string): boolean; /** Built-ins the workspace builder offers (`agent-native.builtinAgents`). */ export declare function getBuiltinAgents(selfAppId?: string, options?: { preferLocalUrls?: boolean; }): DiscoveredAgent[]; export declare function discoverAgents(selfAppId?: string, options?: DiscoverAgentsOptions): Promise; export declare function discoverAgentsWithDirectoryStatus(selfAppId?: string, options?: DiscoverAgentsOptions): Promise; export declare function discoverOrgDirectoryAgents(selfAppId?: string, options?: DiscoverOrgDirectoryAgentsOptions): Promise; /** @deprecated Agent routing now matches normalized handles and declared aliases. */ export declare function agentHandleNumberVariant(handle: string): string | null; export declare function findAgent(idOrName: string, selfAppId?: string, options?: DiscoverAgentsOptions): Promise; export declare function findWorkspaceDispatchAgent(): Promise; export declare function getBuiltinAgentsForSeeding(): DiscoveredAgent[];