// Framework for agent-native apps. // Import everything from "@agent-native/core". // Agent (production mode) export { createProductionAgentHandler, type ActionEntry, type ScriptEntry, type ProductionAgentOptions, type ActionTool, type ScriptTool, type AgentMessage, type AgentChatRequest, type AgentChatEvent, type AgentChatAttachment, DEFAULT_MODEL, // In-loop processors (observers/guardrails for runAgentLoop) TripWire, type Processor, type ProcessorState, type ProcessorAbort, } from "./agent/index.js"; export { defineAction, AgentActionStopError, isAgentActionStopError, type ActionDefinition, type ActionHttpConfig, type AgentActionStopOptions, type PublicAgentActionConfig, type ActionDeepLink, type ActionLinkBuilder, MCP_APP_EXTENSION_ID, MCP_APP_MIME_TYPE, MCP_APP_RESOURCE_URI_META_KEY, type ActionMcpAppConfig, type ActionMcpAppCsp, type ActionMcpAppCspBuilder, type ActionMcpAppHtmlBuilder, type ActionMcpAppPermissions, type ActionMcpAppResourceConfig, type ActionMcpAppResourceMeta, } from "./action.js"; export * from "./user-profile/index.js"; export { embedApp, MCP_APP_REQUEST_ORIGIN_CSP_SOURCE, type EmbedAppOptions, } from "./mcp/embed-app.js"; export { embedRoute, type EmbedRouteContext, type EmbedRouteOptions, type EmbedRoutePathBuilder, type EmbedRouteResult, } from "./mcp/embed-route.js"; export { ACTION_CHAT_UI_DATA_CHART_RENDERER, ACTION_CHAT_UI_DATA_INSIGHTS_RENDERER, ACTION_CHAT_UI_DATA_TABLE_RENDERER, ACTION_CHAT_UI_DATA_WIDGET_RENDERER, ACTION_CHAT_UI_INLINE_EXTENSION_RENDERER, type ActionChatUIConfig, } from "./action-ui.js"; export { DATA_CHART_WIDGET, DATA_INSIGHTS_WIDGET, DATA_TABLE_WIDGET, createDataChartWidgetResult, createDataInsightsWidgetResult, createDataTableWidgetResult, dataChartWidgetResultSchema, dataChartWidgetSchema, dataInsightsWidgetResultSchema, dataTableWidgetResultSchema, dataTableWidgetSchema, dataWidgetResultSchema, isDataChartWidget, isDataTableWidget, isDataWidgetResult, normalizeDataWidgetKind, normalizeDataWidgetResult, type DataChartSeriesDefinition, type DataChartWidget, type DataChartWidgetResult, type DataChartWidgetResultInput, type DataInsightsWidgetResult, type DataInsightsWidgetResultInput, type DataTableColumn, type DataTableWidget, type DataTableWidgetResult, type DataTableWidgetResultInput, type DataWidgetDisplay, type DataWidgetKind, type DataWidgetResult, type DataWidgetResultMetadata, } from "./data-widgets/index.js"; export { createDevScriptRegistry } from "./scripts/dev/index.js"; export { createAgentChatPlugin, defaultAgentChatPlugin, type AgentChatPluginOptions, } from "./server/agent-chat-plugin.js"; export { createAgentNativeEmbeddedPlugin, mountAgentNativeEmbedded, type AgentNativeEmbeddedPluginOptions, } from "./server/embedded.js"; export { BUILT_IN_INTEGRATION_CATALOG, INTEGRATION_CATEGORIES, getIntegrationCatalogEntry, listBuiltInChannelIntegrations, listIntegrationCatalog, type AutomationCapabilities, type BuiltInChannelId, type ChannelCapabilities, type IntegrationAvailability, type IntegrationCatalogEntry, type IntegrationCategory, type IntegrationCredentialRequirement, type IntegrationIconKey, type IntegrationSupportMaturity, } from "./integrations/catalog.js"; export { AutomationConnectorError, createAutomationCallbackHandler, createAutomationRuntime, createInvokeAutomationWorkflowAction, type AutomationCallbackAuthentication, type AutomationCallbackInput, type AutomationCallbackResult, type AutomationInboundDefinition, type AutomationInvocation, type AutomationInvocationResult, type AutomationInvocationStatus, type AutomationOutboundDefinition, type AutomationResponseMode, type AutomationRetryPolicy, type AutomationRuntime, type AutomationRuntimeOptions, type AutomationWorkflowCapabilities, type AutomationWorkflowDefinition, type JsonSchema, } from "./automation/index.js"; export { createFeatureFlagsPlugin, defineFeatureFlag, defineFeatureFlags, evaluateFeatureFlag, getFeatureFlagDefinition, getFeatureFlagRules, isFeatureFlagEnabled, listFeatureFlags, registerFeatureFlags, type FeatureFlagDefinition, type FeatureFlagMode, type FeatureFlagRules, type FeatureFlagScope, } from "./feature-flags/index.js"; // Server export { createServer, createSSEHandler, defineNitroPlugin, autoMountAuth, getSession, type CreateServerOptions, type SSEHandlerOptions, type AuthSession, type AuthOptions, } from "./server/index.js"; // Client // // IMPORTANT: this top-level entry (the package `default`/Node condition) must // stay server-safe. It is what `import { defineAction } from "@agent-native/core"` // resolves to in a headless / Node / SSR context, where React, react-router, and // @tanstack/react-query are NOT installed. The React client surface therefore // lives behind the `@agent-native/core/client` subpath instead of being // re-exported here — re-exporting "./client/index.js" from this module would // eagerly pull route-state.ts → "@tanstack/react-query" into the load graph and // crash any headless app at module load. // // Browser bundlers resolve "@agent-native/core" to the `browser` condition // (./index.browser.ts), which re-exports the client surface, so UI code that // imports client helpers from the bare specifier keeps working in the browser. // Code that runs through the Node entry (SSR, scripts, headless) must import // client helpers explicitly: // // import { useDbSync, cn } from "@agent-native/core/client"; // Shared (isomorphic) export { agentChat, type AgentChatCallOptions, type AgentChatResponse, } from "./shared/index.js"; export { EMBED_MODE_QUERY_PARAM, EMBED_SESSION_COOKIE, EMBED_START_PATH, EMBED_TOKEN_QUERY_PARAM, } from "./shared/embed-auth.js"; // Agent Web surfaces export { AGENT_WEB_CRAWLER_CATEGORIES, AGENT_WEB_CRAWLER_USER_AGENTS, DEFAULT_AGENT_WEB_CRAWLER_POLICY, absoluteUrl, agentWebConfigFromPackageJson, buildAgentWebStaticFiles, buildBaseJsonLd, buildLlmsFullTxt, buildLlmsTxt, buildMarkdownResponseHeaders, buildPageJsonLd, buildRobotsTxt, buildSitemapXml, deriveAgentWebPublicRoutes, estimateMarkdownTokens, markdownFilePathForPage, markdownUrlForPage, normalizeAgentWebConfig, pathPatternMatches, resolveAgentWebCrawlerPolicy, type AgentWebConfig, type AgentWebCrawlerCategory, type AgentWebCrawlerDecision, type AgentWebCrawlerOverrides, type AgentWebCrawlerPolicy, type AgentWebInputConfig, type AgentWebPage, type AgentWebStaticFile, type BuildAgentWebStaticFilesOptions, type DeriveAgentWebPublicRoutesOptions, type MarkdownResponseHeadersOptions, } from "./agent-web/index.js"; // Token usage tracking export { recordUsage, getUsageSummary, getUserUsageCents, calculateCost, usageBillingForEngine, builderCreditsFromCostCents, BUILDER_AGENT_CREDIT_MARGIN_MULTIPLIER, BUILDER_AGENT_CREDITS_PER_USD, BUILDER_CREDIT_USAGE_BILLING, USD_USAGE_BILLING, type UsageRecord, type UsageCostSource, type UsageCostAggregate, type UsageSummary, type UsageBillingMode, type UsageBillingUnit, type UsageBucket, type DailyBucket, type UsageRecentEntry, } from "./usage/store.js"; // Workspace-scoped third-party connection metadata export { deleteWorkspaceConnection, getWorkspaceConnectionAppAccess, getWorkspaceConnection, getWorkspaceConnectionGrant, listWorkspaceConnectionProviderCatalogForApp, listWorkspaceConnectionGrants, listWorkspaceConnections, resolveWorkspaceConnectionCredentialForApp, resolveWorkspaceConnectionCredentialsForApp, revokeWorkspaceConnectionGrant, serializeWorkspaceConnectionGrant, serializeWorkspaceConnection, summarizeWorkspaceConnectionProviderForApp, summarizeWorkspaceConnectionProviderReadiness, upsertWorkspaceConnectionGrant, upsertWorkspaceConnection, type ListWorkspaceConnectionProviderCatalogForAppOptions, type ListWorkspaceConnectionGrantsOptions, type ListWorkspaceConnectionsOptions, type ResolveWorkspaceConnectionCredentialForAppOptions, type ResolveWorkspaceConnectionCredentialsForAppOptions, type SerializedWorkspaceConnectionGrant, type SerializedWorkspaceConnection, type SummarizeWorkspaceConnectionProviderForAppOptions, type SummarizeWorkspaceConnectionProviderReadinessOptions, type UpsertWorkspaceConnectionGrantInput, type UpsertWorkspaceConnectionInput, type WorkspaceConnectionAppAccess, type WorkspaceConnectionAppAccessMode, type WorkspaceConnection, type WorkspaceConnectionCredentialBackend, type WorkspaceConnectionCredentialProvenance, type WorkspaceConnectionCredentialRef, type WorkspaceConnectionCredentialResolution, type WorkspaceConnectionCredentialResolutionCheck, type WorkspaceConnectionCredentialResolutionStatus, type WorkspaceConnectionCredentialsResolution, type WorkspaceConnectionExplicitGrantSummary, type WorkspaceConnectionForAppSummary, type WorkspaceConnectionGrant, type WorkspaceConnectionGrantAvailability, type WorkspaceConnectionGrantState, type WorkspaceConnectionProviderAppSummary, type WorkspaceConnectionProviderLike, type WorkspaceConnectionProviderCatalogForApp, type WorkspaceConnectionProviderCatalogForAppItem, type WorkspaceConnectionProviderReadiness, type WorkspaceConnectionProviderReadinessStatus, type WorkspaceConnectionPublicCredentialRef, type WorkspaceConnectionStatus, workspaceConnectionIsAvailableToApp, registerWorkspaceConnectionLifecycleListener, type WorkspaceConnectionLifecycleEvent, type WorkspaceConnectionLifecycleListener, } from "./workspace-connections/index.js"; // Reusable workspace connection provider catalog export { PROVIDER_READERS, ProviderReaderRuntimeError, WORKSPACE_CONNECTION_PROVIDERS, createProviderReaderRuntime, defineProviderReader, defineProviderReaderImplementation, defineWorkspaceConnectionProvider, getProviderReader, getWorkspaceConnectionProvider, isWorkspaceConnectionProviderId, listProviderReaders, listWorkspaceConnectionProviders, listWorkspaceConnectionProvidersForCapability, listWorkspaceConnectionProvidersForTemplate, mergeWorkspaceConnectionProviders, providerReaderSupports, workspaceConnectionProviderSupports, type ListWorkspaceConnectionProvidersOptions, type ListProviderReadersOptions, type ProviderReaderCapability, type ProviderReaderCredentialRequirement, type ProviderReaderDefinition, type ProviderReaderImplementationStatus, type ProviderReaderOperation, type ProviderReaderOperationDescriptor, type ProviderReaderOperationParameter, type ProviderReaderRequest, type ProviderReaderRuntime, type ProviderReaderRuntimeConnection, type ProviderReaderRuntimeConnectionResolverOptions, type ProviderReaderRuntimeContext, type ProviderReaderRuntimeCredentialsResolverOptions, type ProviderReaderRuntimeErrorCode, type ProviderReaderRuntimeHandler, type ProviderReaderRuntimeImplementation, type ProviderReaderRuntimeItem, type ProviderReaderRuntimeOptions, type ProviderReaderRuntimeResponse, type WorkspaceConnectionCapability, type WorkspaceConnectionCredentialKey, type WorkspaceConnectionProvider, type WorkspaceConnectionProviderId, type WorkspaceConnectionTemplateUse, } from "./connections/index.js"; // Scripts export { runScript, loadEnv, parseArgs, camelCaseArgs, isValidPath, isValidProjectPath, ensureDir, fail, } from "./scripts/index.js"; // Secrets registry — import from "@agent-native/core/secrets" when possible // (the subpath keeps the top-level entry point lean), but re-export the // public API here for convenience. export { registerRequiredSecret, listRequiredSecrets, getRequiredSecret, readAppSecret, writeAppSecret, deleteAppSecret, type RegisteredSecret, type SecretScope, type SecretKind, type SecretValidator, type SecretRef, } from "./secrets/index.js"; export * from "./history/index.js"; export * from "./review/index.js"; export * from "./org-team/index.js"; export * from "./navigation/index.js"; export * from "./command-navigation/index.js"; export * from "./search/index.js"; export * from "./embeddings/index.js"; export { registerWorkspaceConnectionOnboardingStep, type RegisterWorkspaceConnectionOnboardingStepOptions, } from "./setup-connections/index.js";