@agent-native/core 0.62.1 → 0.63.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +0 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -1
- package/dist/index.js.map +1 -1
- package/dist/templates/default/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/dist/templates/default/.agents/skills/real-time-sync/SKILL.md +1 -1
- package/dist/templates/default/DEVELOPING.md +1 -1
- package/dist/templates/default/app/lib/utils.ts +1 -1
- package/dist/templates/default/app/root.tsx +1 -1
- package/dist/templates/headless/actions/hello.ts +1 -1
- package/dist/templates/workspace-core/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/dist/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +1 -1
- package/package.json +1 -1
- package/src/templates/default/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/src/templates/default/.agents/skills/real-time-sync/SKILL.md +1 -1
- package/src/templates/default/DEVELOPING.md +1 -1
- package/src/templates/default/app/lib/utils.ts +1 -1
- package/src/templates/default/app/root.tsx +1 -1
- package/src/templates/headless/actions/hello.ts +1 -1
- package/src/templates/workspace-core/.agents/skills/delegate-to-agent/SKILL.md +3 -3
- package/src/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,6 @@ export { createDevScriptRegistry } from "./scripts/dev/index.js";
|
|
|
8
8
|
export { createAgentChatPlugin, defaultAgentChatPlugin, type AgentChatPluginOptions, } from "./server/agent-chat-plugin.js";
|
|
9
9
|
export { createAgentNativeEmbeddedPlugin, mountAgentNativeEmbedded, type AgentNativeEmbeddedPluginOptions, } from "./server/embedded.js";
|
|
10
10
|
export { createServer, createSSEHandler, defineNitroPlugin, autoMountAuth, getSession, type CreateServerOptions, type SSEHandlerOptions, type AuthSession, type AuthOptions, } from "./server/index.js";
|
|
11
|
-
export { addContextToAgentChat, appendAgentChatContextToMessage, clearAgentChatContext, formatAgentChatContextItemsForPrompt, listAgentChatContext, refreshAgentChatContext, removeAgentChatContextItem, sendToAgentChat, setAgentChatContextItem, setContextToAgentChat, isEmbedMcpChatBridgeActive, useAgentChatContext, useAgentChatGenerating, useDevMode, useSendToAgentChat, AGENT_NATIVE_MCP_APP_HOST_MESSAGE_TYPES, getMcpAppHostContext, openMcpAppHostLink, requestMcpAppDisplayMode, updateMcpAppModelContext, useMcpAppHostContext, CodeRequiredDialog, useAgentNativeEmbeddedBrowserSession, useDbSync, useFileWatcher, cn, ApiKeySettings, useSession, AgentNativeEmbedded, useProductionAgent, ProductionAgentPanel, type AgentChatContextItem, type AgentChatContextMessage, type AgentChatContextMutationOptions, type AgentChatContextRemoveOptions, type AgentChatContextSetOptions, type AgentChatContextState, type AgentChatMessage, type AgentNativeMcpAppHostMessageType, type McpAppDisplayMode, type McpAppHostCapabilities, type McpAppHostContext, type McpAppHostContextSnapshot, type McpAppModelContextContentPart, type McpAppModelContextUpdate, type AgentNativeEmbeddedProps, type UseAgentNativeEmbeddedBrowserSessionOptions, type CodeRequiredDialogProps, type ProductionAgentMessage, type UseProductionAgentResult, type ProductionAgentPanelProps, type UseAgentChatContextResult, useActionQuery, useActionMutation, } from "./client/index.js";
|
|
12
11
|
export { agentChat, type AgentChatCallOptions, type AgentChatResponse, } from "./shared/index.js";
|
|
13
12
|
export { EMBED_MODE_QUERY_PARAM, EMBED_SESSION_COOKIE, EMBED_START_PATH, EMBED_TOKEN_QUERY_PARAM, } from "./shared/embed-auth.js";
|
|
14
13
|
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";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,4BAA4B,EAC5B,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,sBAAsB,EAC3B,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,aAAa,GACd,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,sBAAsB,EACtB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,oBAAoB,EACpB,iBAAiB,EACjB,6BAA6B,EAC7B,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,GAC9B,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,QAAQ,EACR,iCAAiC,EACjC,KAAK,eAAe,GACrB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,UAAU,EACV,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EACtB,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,GACtB,MAAM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BAAiB,EACjB,aAAa,EACb,cAAc,EACd,eAAe,EACf,KAAK,gBAAgB,EACrB,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,SAAS,GACf,MAAM,oBAAoB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -13,7 +13,23 @@ export { createAgentNativeEmbeddedPlugin, mountAgentNativeEmbedded, } from "./se
|
|
|
13
13
|
// Server
|
|
14
14
|
export { createServer, createSSEHandler, defineNitroPlugin, autoMountAuth, getSession, } from "./server/index.js";
|
|
15
15
|
// Client
|
|
16
|
-
|
|
16
|
+
//
|
|
17
|
+
// IMPORTANT: this top-level entry (the package `default`/Node condition) must
|
|
18
|
+
// stay server-safe. It is what `import { defineAction } from "@agent-native/core"`
|
|
19
|
+
// resolves to in a headless / Node / SSR context, where React, react-router, and
|
|
20
|
+
// @tanstack/react-query are NOT installed. The React client surface therefore
|
|
21
|
+
// lives behind the `@agent-native/core/client` subpath instead of being
|
|
22
|
+
// re-exported here — re-exporting "./client/index.js" from this module would
|
|
23
|
+
// eagerly pull route-state.ts → "@tanstack/react-query" into the load graph and
|
|
24
|
+
// crash any headless app at module load.
|
|
25
|
+
//
|
|
26
|
+
// Browser bundlers resolve "@agent-native/core" to the `browser` condition
|
|
27
|
+
// (./index.browser.ts), which re-exports the client surface, so UI code that
|
|
28
|
+
// imports client helpers from the bare specifier keeps working in the browser.
|
|
29
|
+
// Code that runs through the Node entry (SSR, scripts, headless) must import
|
|
30
|
+
// client helpers explicitly:
|
|
31
|
+
//
|
|
32
|
+
// import { useDbSync, cn } from "@agent-native/core/client";
|
|
17
33
|
// Shared (isomorphic)
|
|
18
34
|
export { agentChat, } from "./shared/index.js";
|
|
19
35
|
export { EMBED_MODE_QUERY_PARAM, EMBED_SESSION_COOKIE, EMBED_START_PATH, EMBED_TOKEN_QUERY_PARAM, } from "./shared/embed-auth.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version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AiC,EACjC,4BAA4B,EAC5B,0CAA0C,EAC1C,6CAA6C,EAC7C,8BAA8B,EAC9B,yBAAyB,EAmCzB,mCAAmC,GACpC,MAAM,kCAAkC,CAAC;AAE1C,iDAAiD;AACjD,OAAO,EACL,gBAAgB,EAChB,0BAA0B,EAC1B,8BAA8B,EAC9B,2BAA2B,EAC3B,oBAAoB,EACpB,kCAAkC,EAClC,iCAAiC,EACjC,iBAAiB,EACjB,8BAA8B,EAC9B,+BAA+B,EAC/B,mBAAmB,EACnB,gCAAgC,EAChC,6CAA6C,EAC7C,2CAA2C,EAC3C,sBAAsB,EACtB,mCAAmC,GA2BpC,MAAM,wBAAwB,CAAC;AAEhC,UAAU;AACV,OAAO,EACL,SAAS,EACT,OAAO,EACP,SAAS,EACT,aAAa,EACb,WAAW,EACX,kBAAkB,EAClB,SAAS,EACT,IAAI,GACL,MAAM,oBAAoB,CAAC;AAE5B,4EAA4E;AAC5E,wEAAwE;AACxE,mCAAmC;AACnC,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,eAAe,GAMhB,MAAM,oBAAoB,CAAC","sourcesContent":["// Framework for agent-native apps.\n// Import everything from \"@agent-native/core\".\n\n// Agent (production mode)\nexport {\n createProductionAgentHandler,\n type ActionEntry,\n type ScriptEntry,\n type ProductionAgentOptions,\n type ActionTool,\n type ScriptTool,\n type AgentMessage,\n type AgentChatRequest,\n type AgentChatEvent,\n type AgentChatAttachment,\n DEFAULT_MODEL,\n} from \"./agent/index.js\";\nexport {\n defineAction,\n AgentActionStopError,\n isAgentActionStopError,\n type ActionDefinition,\n type ActionHttpConfig,\n type AgentActionStopOptions,\n type PublicAgentActionConfig,\n type ActionDeepLink,\n type ActionLinkBuilder,\n MCP_APP_EXTENSION_ID,\n MCP_APP_MIME_TYPE,\n MCP_APP_RESOURCE_URI_META_KEY,\n type ActionMcpAppConfig,\n type ActionMcpAppCsp,\n type ActionMcpAppCspBuilder,\n type ActionMcpAppHtmlBuilder,\n type ActionMcpAppPermissions,\n type ActionMcpAppResourceConfig,\n type ActionMcpAppResourceMeta,\n} from \"./action.js\";\nexport {\n embedApp,\n MCP_APP_REQUEST_ORIGIN_CSP_SOURCE,\n type EmbedAppOptions,\n} from \"./mcp/embed-app.js\";\nexport {\n embedRoute,\n type EmbedRouteContext,\n type EmbedRouteOptions,\n type EmbedRoutePathBuilder,\n type EmbedRouteResult,\n} from \"./mcp/embed-route.js\";\nexport {\n ACTION_CHAT_UI_DATA_CHART_RENDERER,\n ACTION_CHAT_UI_DATA_INSIGHTS_RENDERER,\n ACTION_CHAT_UI_DATA_TABLE_RENDERER,\n ACTION_CHAT_UI_DATA_WIDGET_RENDERER,\n type ActionChatUIConfig,\n} from \"./action-ui.js\";\nexport {\n DATA_CHART_WIDGET,\n DATA_INSIGHTS_WIDGET,\n DATA_TABLE_WIDGET,\n createDataChartWidgetResult,\n createDataInsightsWidgetResult,\n createDataTableWidgetResult,\n dataChartWidgetResultSchema,\n dataChartWidgetSchema,\n dataInsightsWidgetResultSchema,\n dataTableWidgetResultSchema,\n dataTableWidgetSchema,\n dataWidgetResultSchema,\n isDataChartWidget,\n isDataTableWidget,\n isDataWidgetResult,\n normalizeDataWidgetKind,\n normalizeDataWidgetResult,\n type DataChartSeriesDefinition,\n type DataChartWidget,\n type DataChartWidgetResult,\n type DataChartWidgetResultInput,\n type DataInsightsWidgetResult,\n type DataInsightsWidgetResultInput,\n type DataTableColumn,\n type DataTableWidget,\n type DataTableWidgetResult,\n type DataTableWidgetResultInput,\n type DataWidgetDisplay,\n type DataWidgetKind,\n type DataWidgetResult,\n type DataWidgetResultMetadata,\n} from \"./data-widgets/index.js\";\nexport { createDevScriptRegistry } from \"./scripts/dev/index.js\";\nexport {\n createAgentChatPlugin,\n defaultAgentChatPlugin,\n type AgentChatPluginOptions,\n} from \"./server/agent-chat-plugin.js\";\nexport {\n createAgentNativeEmbeddedPlugin,\n mountAgentNativeEmbedded,\n type AgentNativeEmbeddedPluginOptions,\n} from \"./server/embedded.js\";\n\n// Server\nexport {\n createServer,\n createSSEHandler,\n defineNitroPlugin,\n autoMountAuth,\n getSession,\n type CreateServerOptions,\n type SSEHandlerOptions,\n type AuthSession,\n type AuthOptions,\n} from \"./server/index.js\";\n\n// Client\nexport {\n addContextToAgentChat,\n appendAgentChatContextToMessage,\n clearAgentChatContext,\n formatAgentChatContextItemsForPrompt,\n listAgentChatContext,\n refreshAgentChatContext,\n removeAgentChatContextItem,\n sendToAgentChat,\n setAgentChatContextItem,\n setContextToAgentChat,\n isEmbedMcpChatBridgeActive,\n useAgentChatContext,\n useAgentChatGenerating,\n useDevMode,\n useSendToAgentChat,\n AGENT_NATIVE_MCP_APP_HOST_MESSAGE_TYPES,\n getMcpAppHostContext,\n openMcpAppHostLink,\n requestMcpAppDisplayMode,\n updateMcpAppModelContext,\n useMcpAppHostContext,\n CodeRequiredDialog,\n useAgentNativeEmbeddedBrowserSession,\n useDbSync,\n useFileWatcher,\n cn,\n ApiKeySettings,\n useSession,\n AgentNativeEmbedded,\n useProductionAgent,\n ProductionAgentPanel,\n type AgentChatContextItem,\n type AgentChatContextMessage,\n type AgentChatContextMutationOptions,\n type AgentChatContextRemoveOptions,\n type AgentChatContextSetOptions,\n type AgentChatContextState,\n type AgentChatMessage,\n type AgentNativeMcpAppHostMessageType,\n type McpAppDisplayMode,\n type McpAppHostCapabilities,\n type McpAppHostContext,\n type McpAppHostContextSnapshot,\n type McpAppModelContextContentPart,\n type McpAppModelContextUpdate,\n type AgentNativeEmbeddedProps,\n type UseAgentNativeEmbeddedBrowserSessionOptions,\n type CodeRequiredDialogProps,\n type ProductionAgentMessage,\n type UseProductionAgentResult,\n type ProductionAgentPanelProps,\n type UseAgentChatContextResult,\n useActionQuery,\n useActionMutation,\n} from \"./client/index.js\";\n\n// Shared (isomorphic)\nexport {\n agentChat,\n type AgentChatCallOptions,\n type AgentChatResponse,\n} from \"./shared/index.js\";\nexport {\n EMBED_MODE_QUERY_PARAM,\n EMBED_SESSION_COOKIE,\n EMBED_START_PATH,\n EMBED_TOKEN_QUERY_PARAM,\n} from \"./shared/embed-auth.js\";\n\n// Agent Web surfaces\nexport {\n AGENT_WEB_CRAWLER_CATEGORIES,\n AGENT_WEB_CRAWLER_USER_AGENTS,\n DEFAULT_AGENT_WEB_CRAWLER_POLICY,\n absoluteUrl,\n agentWebConfigFromPackageJson,\n buildAgentWebStaticFiles,\n buildBaseJsonLd,\n buildLlmsFullTxt,\n buildLlmsTxt,\n buildMarkdownResponseHeaders,\n buildPageJsonLd,\n buildRobotsTxt,\n buildSitemapXml,\n deriveAgentWebPublicRoutes,\n estimateMarkdownTokens,\n markdownFilePathForPage,\n markdownUrlForPage,\n normalizeAgentWebConfig,\n pathPatternMatches,\n resolveAgentWebCrawlerPolicy,\n type AgentWebConfig,\n type AgentWebCrawlerCategory,\n type AgentWebCrawlerDecision,\n type AgentWebCrawlerOverrides,\n type AgentWebCrawlerPolicy,\n type AgentWebInputConfig,\n type AgentWebPage,\n type AgentWebStaticFile,\n type BuildAgentWebStaticFilesOptions,\n type DeriveAgentWebPublicRoutesOptions,\n type MarkdownResponseHeadersOptions,\n} from \"./agent-web/index.js\";\n\n// Token usage tracking\nexport {\n recordUsage,\n getUsageSummary,\n getUserUsageCents,\n calculateCost,\n usageBillingForEngine,\n builderCreditsFromCostCents,\n BUILDER_AGENT_CREDIT_MARGIN_MULTIPLIER,\n BUILDER_AGENT_CREDITS_PER_USD,\n BUILDER_CREDIT_USAGE_BILLING,\n USD_USAGE_BILLING,\n type UsageRecord,\n type UsageSummary,\n type UsageBillingMode,\n type UsageBillingUnit,\n type UsageBucket,\n type DailyBucket,\n type UsageRecentEntry,\n} from \"./usage/store.js\";\n\n// Workspace-scoped third-party connection metadata\nexport {\n deleteWorkspaceConnection,\n getWorkspaceConnectionAppAccess,\n getWorkspaceConnection,\n getWorkspaceConnectionGrant,\n listWorkspaceConnectionProviderCatalogForApp,\n listWorkspaceConnectionGrants,\n listWorkspaceConnections,\n resolveWorkspaceConnectionCredentialForApp,\n resolveWorkspaceConnectionCredentialsForApp,\n revokeWorkspaceConnectionGrant,\n serializeWorkspaceConnectionGrant,\n serializeWorkspaceConnection,\n summarizeWorkspaceConnectionProviderForApp,\n summarizeWorkspaceConnectionProviderReadiness,\n upsertWorkspaceConnectionGrant,\n upsertWorkspaceConnection,\n type ListWorkspaceConnectionProviderCatalogForAppOptions,\n type ListWorkspaceConnectionGrantsOptions,\n type ListWorkspaceConnectionsOptions,\n type ResolveWorkspaceConnectionCredentialForAppOptions,\n type ResolveWorkspaceConnectionCredentialsForAppOptions,\n type SerializedWorkspaceConnectionGrant,\n type SerializedWorkspaceConnection,\n type SummarizeWorkspaceConnectionProviderForAppOptions,\n type SummarizeWorkspaceConnectionProviderReadinessOptions,\n type UpsertWorkspaceConnectionGrantInput,\n type UpsertWorkspaceConnectionInput,\n type WorkspaceConnectionAppAccess,\n type WorkspaceConnectionAppAccessMode,\n type WorkspaceConnection,\n type WorkspaceConnectionCredentialBackend,\n type WorkspaceConnectionCredentialProvenance,\n type WorkspaceConnectionCredentialRef,\n type WorkspaceConnectionCredentialResolution,\n type WorkspaceConnectionCredentialResolutionCheck,\n type WorkspaceConnectionCredentialResolutionStatus,\n type WorkspaceConnectionCredentialsResolution,\n type WorkspaceConnectionExplicitGrantSummary,\n type WorkspaceConnectionForAppSummary,\n type WorkspaceConnectionGrant,\n type WorkspaceConnectionGrantAvailability,\n type WorkspaceConnectionGrantState,\n type WorkspaceConnectionProviderAppSummary,\n type WorkspaceConnectionProviderLike,\n type WorkspaceConnectionProviderCatalogForApp,\n type WorkspaceConnectionProviderCatalogForAppItem,\n type WorkspaceConnectionProviderReadiness,\n type WorkspaceConnectionProviderReadinessStatus,\n type WorkspaceConnectionPublicCredentialRef,\n type WorkspaceConnectionStatus,\n workspaceConnectionIsAvailableToApp,\n} from \"./workspace-connections/index.js\";\n\n// Reusable workspace connection provider catalog\nexport {\n PROVIDER_READERS,\n ProviderReaderRuntimeError,\n WORKSPACE_CONNECTION_PROVIDERS,\n createProviderReaderRuntime,\n defineProviderReader,\n defineProviderReaderImplementation,\n defineWorkspaceConnectionProvider,\n getProviderReader,\n getWorkspaceConnectionProvider,\n isWorkspaceConnectionProviderId,\n listProviderReaders,\n listWorkspaceConnectionProviders,\n listWorkspaceConnectionProvidersForCapability,\n listWorkspaceConnectionProvidersForTemplate,\n providerReaderSupports,\n workspaceConnectionProviderSupports,\n type ListWorkspaceConnectionProvidersOptions,\n type ListProviderReadersOptions,\n type ProviderReaderCapability,\n type ProviderReaderCredentialRequirement,\n type ProviderReaderDefinition,\n type ProviderReaderImplementationStatus,\n type ProviderReaderOperation,\n type ProviderReaderOperationDescriptor,\n type ProviderReaderOperationParameter,\n type ProviderReaderRequest,\n type ProviderReaderRuntime,\n type ProviderReaderRuntimeConnection,\n type ProviderReaderRuntimeConnectionResolverOptions,\n type ProviderReaderRuntimeContext,\n type ProviderReaderRuntimeCredentialsResolverOptions,\n type ProviderReaderRuntimeErrorCode,\n type ProviderReaderRuntimeHandler,\n type ProviderReaderRuntimeImplementation,\n type ProviderReaderRuntimeItem,\n type ProviderReaderRuntimeOptions,\n type ProviderReaderRuntimeResponse,\n type WorkspaceConnectionCapability,\n type WorkspaceConnectionCredentialKey,\n type WorkspaceConnectionProvider,\n type WorkspaceConnectionProviderId,\n type WorkspaceConnectionTemplateUse,\n} from \"./connections/index.js\";\n\n// Scripts\nexport {\n runScript,\n loadEnv,\n parseArgs,\n camelCaseArgs,\n isValidPath,\n isValidProjectPath,\n ensureDir,\n fail,\n} from \"./scripts/index.js\";\n\n// Secrets registry — import from \"@agent-native/core/secrets\" when possible\n// (the subpath keeps the top-level entry point lean), but re-export the\n// public API here for convenience.\nexport {\n registerRequiredSecret,\n listRequiredSecrets,\n getRequiredSecret,\n readAppSecret,\n writeAppSecret,\n deleteAppSecret,\n type RegisteredSecret,\n type SecretScope,\n type SecretKind,\n type SecretValidator,\n type SecretRef,\n} from \"./secrets/index.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,mCAAmC;AACnC,+CAA+C;AAE/C,0BAA0B;AAC1B,OAAO,EACL,4BAA4B,EAU5B,aAAa,GACd,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,sBAAsB,EAOtB,oBAAoB,EACpB,iBAAiB,EACjB,6BAA6B,GAQ9B,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,QAAQ,EACR,iCAAiC,GAElC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,UAAU,GAKX,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,kCAAkC,EAClC,qCAAqC,EACrC,kCAAkC,EAClC,mCAAmC,GAEpC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,2BAA2B,EAC3B,8BAA8B,EAC9B,2BAA2B,EAC3B,2BAA2B,EAC3B,qBAAqB,EACrB,8BAA8B,EAC9B,2BAA2B,EAC3B,qBAAqB,EACrB,sBAAsB,EACtB,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,EAClB,uBAAuB,EACvB,yBAAyB,GAe1B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EACL,qBAAqB,EACrB,sBAAsB,GAEvB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,+BAA+B,EAC/B,wBAAwB,GAEzB,MAAM,sBAAsB,CAAC;AAE9B,SAAS;AACT,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,UAAU,GAKX,MAAM,mBAAmB,CAAC;AAE3B,SAAS;AACT,EAAE;AACF,8EAA8E;AAC9E,mFAAmF;AACnF,iFAAiF;AACjF,8EAA8E;AAC9E,wEAAwE;AAC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AA2B,EAC3B,oBAAoB,EACpB,kCAAkC,EAClC,iCAAiC,EACjC,iBAAiB,EACjB,8BAA8B,EAC9B,+BAA+B,EAC/B,mBAAmB,EACnB,gCAAgC,EAChC,6CAA6C,EAC7C,2CAA2C,EAC3C,sBAAsB,EACtB,mCAAmC,GA2BpC,MAAM,wBAAwB,CAAC;AAEhC,UAAU;AACV,OAAO,EACL,SAAS,EACT,OAAO,EACP,SAAS,EACT,aAAa,EACb,WAAW,EACX,kBAAkB,EAClB,SAAS,EACT,IAAI,GACL,MAAM,oBAAoB,CAAC;AAE5B,4EAA4E;AAC5E,wEAAwE;AACxE,mCAAmC;AACnC,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,eAAe,GAMhB,MAAM,oBAAoB,CAAC","sourcesContent":["// Framework for agent-native apps.\n// Import everything from \"@agent-native/core\".\n\n// Agent (production mode)\nexport {\n createProductionAgentHandler,\n type ActionEntry,\n type ScriptEntry,\n type ProductionAgentOptions,\n type ActionTool,\n type ScriptTool,\n type AgentMessage,\n type AgentChatRequest,\n type AgentChatEvent,\n type AgentChatAttachment,\n DEFAULT_MODEL,\n} from \"./agent/index.js\";\nexport {\n defineAction,\n AgentActionStopError,\n isAgentActionStopError,\n type ActionDefinition,\n type ActionHttpConfig,\n type AgentActionStopOptions,\n type PublicAgentActionConfig,\n type ActionDeepLink,\n type ActionLinkBuilder,\n MCP_APP_EXTENSION_ID,\n MCP_APP_MIME_TYPE,\n MCP_APP_RESOURCE_URI_META_KEY,\n type ActionMcpAppConfig,\n type ActionMcpAppCsp,\n type ActionMcpAppCspBuilder,\n type ActionMcpAppHtmlBuilder,\n type ActionMcpAppPermissions,\n type ActionMcpAppResourceConfig,\n type ActionMcpAppResourceMeta,\n} from \"./action.js\";\nexport {\n embedApp,\n MCP_APP_REQUEST_ORIGIN_CSP_SOURCE,\n type EmbedAppOptions,\n} from \"./mcp/embed-app.js\";\nexport {\n embedRoute,\n type EmbedRouteContext,\n type EmbedRouteOptions,\n type EmbedRoutePathBuilder,\n type EmbedRouteResult,\n} from \"./mcp/embed-route.js\";\nexport {\n ACTION_CHAT_UI_DATA_CHART_RENDERER,\n ACTION_CHAT_UI_DATA_INSIGHTS_RENDERER,\n ACTION_CHAT_UI_DATA_TABLE_RENDERER,\n ACTION_CHAT_UI_DATA_WIDGET_RENDERER,\n type ActionChatUIConfig,\n} from \"./action-ui.js\";\nexport {\n DATA_CHART_WIDGET,\n DATA_INSIGHTS_WIDGET,\n DATA_TABLE_WIDGET,\n createDataChartWidgetResult,\n createDataInsightsWidgetResult,\n createDataTableWidgetResult,\n dataChartWidgetResultSchema,\n dataChartWidgetSchema,\n dataInsightsWidgetResultSchema,\n dataTableWidgetResultSchema,\n dataTableWidgetSchema,\n dataWidgetResultSchema,\n isDataChartWidget,\n isDataTableWidget,\n isDataWidgetResult,\n normalizeDataWidgetKind,\n normalizeDataWidgetResult,\n type DataChartSeriesDefinition,\n type DataChartWidget,\n type DataChartWidgetResult,\n type DataChartWidgetResultInput,\n type DataInsightsWidgetResult,\n type DataInsightsWidgetResultInput,\n type DataTableColumn,\n type DataTableWidget,\n type DataTableWidgetResult,\n type DataTableWidgetResultInput,\n type DataWidgetDisplay,\n type DataWidgetKind,\n type DataWidgetResult,\n type DataWidgetResultMetadata,\n} from \"./data-widgets/index.js\";\nexport { createDevScriptRegistry } from \"./scripts/dev/index.js\";\nexport {\n createAgentChatPlugin,\n defaultAgentChatPlugin,\n type AgentChatPluginOptions,\n} from \"./server/agent-chat-plugin.js\";\nexport {\n createAgentNativeEmbeddedPlugin,\n mountAgentNativeEmbedded,\n type AgentNativeEmbeddedPluginOptions,\n} from \"./server/embedded.js\";\n\n// Server\nexport {\n createServer,\n createSSEHandler,\n defineNitroPlugin,\n autoMountAuth,\n getSession,\n type CreateServerOptions,\n type SSEHandlerOptions,\n type AuthSession,\n type AuthOptions,\n} from \"./server/index.js\";\n\n// Client\n//\n// IMPORTANT: this top-level entry (the package `default`/Node condition) must\n// stay server-safe. It is what `import { defineAction } from \"@agent-native/core\"`\n// resolves to in a headless / Node / SSR context, where React, react-router, and\n// @tanstack/react-query are NOT installed. The React client surface therefore\n// lives behind the `@agent-native/core/client` subpath instead of being\n// re-exported here — re-exporting \"./client/index.js\" from this module would\n// eagerly pull route-state.ts → \"@tanstack/react-query\" into the load graph and\n// crash any headless app at module load.\n//\n// Browser bundlers resolve \"@agent-native/core\" to the `browser` condition\n// (./index.browser.ts), which re-exports the client surface, so UI code that\n// imports client helpers from the bare specifier keeps working in the browser.\n// Code that runs through the Node entry (SSR, scripts, headless) must import\n// client helpers explicitly:\n//\n// import { useDbSync, cn } from \"@agent-native/core/client\";\n\n// Shared (isomorphic)\nexport {\n agentChat,\n type AgentChatCallOptions,\n type AgentChatResponse,\n} from \"./shared/index.js\";\nexport {\n EMBED_MODE_QUERY_PARAM,\n EMBED_SESSION_COOKIE,\n EMBED_START_PATH,\n EMBED_TOKEN_QUERY_PARAM,\n} from \"./shared/embed-auth.js\";\n\n// Agent Web surfaces\nexport {\n AGENT_WEB_CRAWLER_CATEGORIES,\n AGENT_WEB_CRAWLER_USER_AGENTS,\n DEFAULT_AGENT_WEB_CRAWLER_POLICY,\n absoluteUrl,\n agentWebConfigFromPackageJson,\n buildAgentWebStaticFiles,\n buildBaseJsonLd,\n buildLlmsFullTxt,\n buildLlmsTxt,\n buildMarkdownResponseHeaders,\n buildPageJsonLd,\n buildRobotsTxt,\n buildSitemapXml,\n deriveAgentWebPublicRoutes,\n estimateMarkdownTokens,\n markdownFilePathForPage,\n markdownUrlForPage,\n normalizeAgentWebConfig,\n pathPatternMatches,\n resolveAgentWebCrawlerPolicy,\n type AgentWebConfig,\n type AgentWebCrawlerCategory,\n type AgentWebCrawlerDecision,\n type AgentWebCrawlerOverrides,\n type AgentWebCrawlerPolicy,\n type AgentWebInputConfig,\n type AgentWebPage,\n type AgentWebStaticFile,\n type BuildAgentWebStaticFilesOptions,\n type DeriveAgentWebPublicRoutesOptions,\n type MarkdownResponseHeadersOptions,\n} from \"./agent-web/index.js\";\n\n// Token usage tracking\nexport {\n recordUsage,\n getUsageSummary,\n getUserUsageCents,\n calculateCost,\n usageBillingForEngine,\n builderCreditsFromCostCents,\n BUILDER_AGENT_CREDIT_MARGIN_MULTIPLIER,\n BUILDER_AGENT_CREDITS_PER_USD,\n BUILDER_CREDIT_USAGE_BILLING,\n USD_USAGE_BILLING,\n type UsageRecord,\n type UsageSummary,\n type UsageBillingMode,\n type UsageBillingUnit,\n type UsageBucket,\n type DailyBucket,\n type UsageRecentEntry,\n} from \"./usage/store.js\";\n\n// Workspace-scoped third-party connection metadata\nexport {\n deleteWorkspaceConnection,\n getWorkspaceConnectionAppAccess,\n getWorkspaceConnection,\n getWorkspaceConnectionGrant,\n listWorkspaceConnectionProviderCatalogForApp,\n listWorkspaceConnectionGrants,\n listWorkspaceConnections,\n resolveWorkspaceConnectionCredentialForApp,\n resolveWorkspaceConnectionCredentialsForApp,\n revokeWorkspaceConnectionGrant,\n serializeWorkspaceConnectionGrant,\n serializeWorkspaceConnection,\n summarizeWorkspaceConnectionProviderForApp,\n summarizeWorkspaceConnectionProviderReadiness,\n upsertWorkspaceConnectionGrant,\n upsertWorkspaceConnection,\n type ListWorkspaceConnectionProviderCatalogForAppOptions,\n type ListWorkspaceConnectionGrantsOptions,\n type ListWorkspaceConnectionsOptions,\n type ResolveWorkspaceConnectionCredentialForAppOptions,\n type ResolveWorkspaceConnectionCredentialsForAppOptions,\n type SerializedWorkspaceConnectionGrant,\n type SerializedWorkspaceConnection,\n type SummarizeWorkspaceConnectionProviderForAppOptions,\n type SummarizeWorkspaceConnectionProviderReadinessOptions,\n type UpsertWorkspaceConnectionGrantInput,\n type UpsertWorkspaceConnectionInput,\n type WorkspaceConnectionAppAccess,\n type WorkspaceConnectionAppAccessMode,\n type WorkspaceConnection,\n type WorkspaceConnectionCredentialBackend,\n type WorkspaceConnectionCredentialProvenance,\n type WorkspaceConnectionCredentialRef,\n type WorkspaceConnectionCredentialResolution,\n type WorkspaceConnectionCredentialResolutionCheck,\n type WorkspaceConnectionCredentialResolutionStatus,\n type WorkspaceConnectionCredentialsResolution,\n type WorkspaceConnectionExplicitGrantSummary,\n type WorkspaceConnectionForAppSummary,\n type WorkspaceConnectionGrant,\n type WorkspaceConnectionGrantAvailability,\n type WorkspaceConnectionGrantState,\n type WorkspaceConnectionProviderAppSummary,\n type WorkspaceConnectionProviderLike,\n type WorkspaceConnectionProviderCatalogForApp,\n type WorkspaceConnectionProviderCatalogForAppItem,\n type WorkspaceConnectionProviderReadiness,\n type WorkspaceConnectionProviderReadinessStatus,\n type WorkspaceConnectionPublicCredentialRef,\n type WorkspaceConnectionStatus,\n workspaceConnectionIsAvailableToApp,\n} from \"./workspace-connections/index.js\";\n\n// Reusable workspace connection provider catalog\nexport {\n PROVIDER_READERS,\n ProviderReaderRuntimeError,\n WORKSPACE_CONNECTION_PROVIDERS,\n createProviderReaderRuntime,\n defineProviderReader,\n defineProviderReaderImplementation,\n defineWorkspaceConnectionProvider,\n getProviderReader,\n getWorkspaceConnectionProvider,\n isWorkspaceConnectionProviderId,\n listProviderReaders,\n listWorkspaceConnectionProviders,\n listWorkspaceConnectionProvidersForCapability,\n listWorkspaceConnectionProvidersForTemplate,\n providerReaderSupports,\n workspaceConnectionProviderSupports,\n type ListWorkspaceConnectionProvidersOptions,\n type ListProviderReadersOptions,\n type ProviderReaderCapability,\n type ProviderReaderCredentialRequirement,\n type ProviderReaderDefinition,\n type ProviderReaderImplementationStatus,\n type ProviderReaderOperation,\n type ProviderReaderOperationDescriptor,\n type ProviderReaderOperationParameter,\n type ProviderReaderRequest,\n type ProviderReaderRuntime,\n type ProviderReaderRuntimeConnection,\n type ProviderReaderRuntimeConnectionResolverOptions,\n type ProviderReaderRuntimeContext,\n type ProviderReaderRuntimeCredentialsResolverOptions,\n type ProviderReaderRuntimeErrorCode,\n type ProviderReaderRuntimeHandler,\n type ProviderReaderRuntimeImplementation,\n type ProviderReaderRuntimeItem,\n type ProviderReaderRuntimeOptions,\n type ProviderReaderRuntimeResponse,\n type WorkspaceConnectionCapability,\n type WorkspaceConnectionCredentialKey,\n type WorkspaceConnectionProvider,\n type WorkspaceConnectionProviderId,\n type WorkspaceConnectionTemplateUse,\n} from \"./connections/index.js\";\n\n// Scripts\nexport {\n runScript,\n loadEnv,\n parseArgs,\n camelCaseArgs,\n isValidPath,\n isValidProjectPath,\n ensureDir,\n fail,\n} from \"./scripts/index.js\";\n\n// Secrets registry — import from \"@agent-native/core/secrets\" when possible\n// (the subpath keeps the top-level entry point lean), but re-export the\n// public API here for convenience.\nexport {\n registerRequiredSecret,\n listRequiredSecrets,\n getRequiredSecret,\n readAppSecret,\n writeAppSecret,\n deleteAppSecret,\n type RegisteredSecret,\n type SecretScope,\n type SecretKind,\n type SecretValidator,\n type SecretRef,\n} from \"./secrets/index.js\";\n"]}
|
|
@@ -28,7 +28,7 @@ The agent is the single AI interface. It has context about the full project, can
|
|
|
28
28
|
**From the UI (client):**
|
|
29
29
|
|
|
30
30
|
```ts
|
|
31
|
-
import { sendToAgentChat } from "@agent-native/core";
|
|
31
|
+
import { sendToAgentChat } from "@agent-native/core/client";
|
|
32
32
|
|
|
33
33
|
sendToAgentChat({
|
|
34
34
|
message: "Generate a summary of this document",
|
|
@@ -40,7 +40,7 @@ sendToAgentChat({
|
|
|
40
40
|
**From the UI, in the background:**
|
|
41
41
|
|
|
42
42
|
```ts
|
|
43
|
-
import { sendToAgentChat } from "@agent-native/core";
|
|
43
|
+
import { sendToAgentChat } from "@agent-native/core/client";
|
|
44
44
|
|
|
45
45
|
sendToAgentChat({
|
|
46
46
|
message: "Analyze this import and create any missing records",
|
|
@@ -82,7 +82,7 @@ Do not call provider SDKs directly.
|
|
|
82
82
|
**From the UI, detecting when agent is done:**
|
|
83
83
|
|
|
84
84
|
```ts
|
|
85
|
-
import { useAgentChatGenerating } from "@agent-native/core";
|
|
85
|
+
import { useAgentChatGenerating } from "@agent-native/core/client";
|
|
86
86
|
|
|
87
87
|
function MyComponent() {
|
|
88
88
|
const isGenerating = useAgentChatGenerating();
|
|
@@ -25,7 +25,7 @@ The agent modifies data in SQL, but the UI runs in the browser. SSE bridges same
|
|
|
25
25
|
2. **Client** listens for sync events and updates per-source change counters:
|
|
26
26
|
|
|
27
27
|
```ts
|
|
28
|
-
import { useDbSync } from "@agent-native/core";
|
|
28
|
+
import { useDbSync } from "@agent-native/core/client";
|
|
29
29
|
useDbSync({ queryClient });
|
|
30
30
|
```
|
|
31
31
|
|
|
@@ -91,7 +91,7 @@ Create `actions/<verb>-<resource>.ts` with `defineAction`. Run with `pnpm action
|
|
|
91
91
|
**From UI:**
|
|
92
92
|
|
|
93
93
|
```ts
|
|
94
|
-
import { sendToAgentChat } from "@agent-native/core";
|
|
94
|
+
import { sendToAgentChat } from "@agent-native/core/client";
|
|
95
95
|
sendToAgentChat({
|
|
96
96
|
message: "Generate something",
|
|
97
97
|
context: "...",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { cn } from "@agent-native/core";
|
|
1
|
+
export { cn } from "@agent-native/core/client";
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from "react-router";
|
|
11
11
|
import { useEffect, useState } from "react";
|
|
12
12
|
import { useQueryClient } from "@tanstack/react-query";
|
|
13
|
-
import { useDbSync } from "@agent-native/core";
|
|
13
|
+
import { useDbSync } from "@agent-native/core/client";
|
|
14
14
|
import {
|
|
15
15
|
AppProviders,
|
|
16
16
|
appPath,
|
|
@@ -28,7 +28,7 @@ The agent is the single AI interface. It has context about the full project, can
|
|
|
28
28
|
**From the UI (client):**
|
|
29
29
|
|
|
30
30
|
```ts
|
|
31
|
-
import { sendToAgentChat } from "@agent-native/core";
|
|
31
|
+
import { sendToAgentChat } from "@agent-native/core/client";
|
|
32
32
|
|
|
33
33
|
sendToAgentChat({
|
|
34
34
|
message: "Generate a summary of this document",
|
|
@@ -40,7 +40,7 @@ sendToAgentChat({
|
|
|
40
40
|
**From the UI, in the background:**
|
|
41
41
|
|
|
42
42
|
```ts
|
|
43
|
-
import { sendToAgentChat } from "@agent-native/core";
|
|
43
|
+
import { sendToAgentChat } from "@agent-native/core/client";
|
|
44
44
|
|
|
45
45
|
sendToAgentChat({
|
|
46
46
|
message: "Analyze this import and create any missing records",
|
|
@@ -82,7 +82,7 @@ Do not call provider SDKs directly.
|
|
|
82
82
|
**From the UI, detecting when agent is done:**
|
|
83
83
|
|
|
84
84
|
```ts
|
|
85
|
-
import { useAgentChatGenerating } from "@agent-native/core";
|
|
85
|
+
import { useAgentChatGenerating } from "@agent-native/core/client";
|
|
86
86
|
|
|
87
87
|
function MyComponent() {
|
|
88
88
|
const isGenerating = useAgentChatGenerating();
|
|
@@ -25,7 +25,7 @@ The agent modifies data in SQL, but the UI runs in the browser. SSE bridges same
|
|
|
25
25
|
2. **Client** listens for sync events and updates per-source change counters:
|
|
26
26
|
|
|
27
27
|
```ts
|
|
28
|
-
import { useDbSync } from "@agent-native/core";
|
|
28
|
+
import { useDbSync } from "@agent-native/core/client";
|
|
29
29
|
useDbSync({ queryClient });
|
|
30
30
|
```
|
|
31
31
|
|
package/package.json
CHANGED
|
@@ -28,7 +28,7 @@ The agent is the single AI interface. It has context about the full project, can
|
|
|
28
28
|
**From the UI (client):**
|
|
29
29
|
|
|
30
30
|
```ts
|
|
31
|
-
import { sendToAgentChat } from "@agent-native/core";
|
|
31
|
+
import { sendToAgentChat } from "@agent-native/core/client";
|
|
32
32
|
|
|
33
33
|
sendToAgentChat({
|
|
34
34
|
message: "Generate a summary of this document",
|
|
@@ -40,7 +40,7 @@ sendToAgentChat({
|
|
|
40
40
|
**From the UI, in the background:**
|
|
41
41
|
|
|
42
42
|
```ts
|
|
43
|
-
import { sendToAgentChat } from "@agent-native/core";
|
|
43
|
+
import { sendToAgentChat } from "@agent-native/core/client";
|
|
44
44
|
|
|
45
45
|
sendToAgentChat({
|
|
46
46
|
message: "Analyze this import and create any missing records",
|
|
@@ -82,7 +82,7 @@ Do not call provider SDKs directly.
|
|
|
82
82
|
**From the UI, detecting when agent is done:**
|
|
83
83
|
|
|
84
84
|
```ts
|
|
85
|
-
import { useAgentChatGenerating } from "@agent-native/core";
|
|
85
|
+
import { useAgentChatGenerating } from "@agent-native/core/client";
|
|
86
86
|
|
|
87
87
|
function MyComponent() {
|
|
88
88
|
const isGenerating = useAgentChatGenerating();
|
|
@@ -25,7 +25,7 @@ The agent modifies data in SQL, but the UI runs in the browser. SSE bridges same
|
|
|
25
25
|
2. **Client** listens for sync events and updates per-source change counters:
|
|
26
26
|
|
|
27
27
|
```ts
|
|
28
|
-
import { useDbSync } from "@agent-native/core";
|
|
28
|
+
import { useDbSync } from "@agent-native/core/client";
|
|
29
29
|
useDbSync({ queryClient });
|
|
30
30
|
```
|
|
31
31
|
|
|
@@ -91,7 +91,7 @@ Create `actions/<verb>-<resource>.ts` with `defineAction`. Run with `pnpm action
|
|
|
91
91
|
**From UI:**
|
|
92
92
|
|
|
93
93
|
```ts
|
|
94
|
-
import { sendToAgentChat } from "@agent-native/core";
|
|
94
|
+
import { sendToAgentChat } from "@agent-native/core/client";
|
|
95
95
|
sendToAgentChat({
|
|
96
96
|
message: "Generate something",
|
|
97
97
|
context: "...",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { cn } from "@agent-native/core";
|
|
1
|
+
export { cn } from "@agent-native/core/client";
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from "react-router";
|
|
11
11
|
import { useEffect, useState } from "react";
|
|
12
12
|
import { useQueryClient } from "@tanstack/react-query";
|
|
13
|
-
import { useDbSync } from "@agent-native/core";
|
|
13
|
+
import { useDbSync } from "@agent-native/core/client";
|
|
14
14
|
import {
|
|
15
15
|
AppProviders,
|
|
16
16
|
appPath,
|
|
@@ -28,7 +28,7 @@ The agent is the single AI interface. It has context about the full project, can
|
|
|
28
28
|
**From the UI (client):**
|
|
29
29
|
|
|
30
30
|
```ts
|
|
31
|
-
import { sendToAgentChat } from "@agent-native/core";
|
|
31
|
+
import { sendToAgentChat } from "@agent-native/core/client";
|
|
32
32
|
|
|
33
33
|
sendToAgentChat({
|
|
34
34
|
message: "Generate a summary of this document",
|
|
@@ -40,7 +40,7 @@ sendToAgentChat({
|
|
|
40
40
|
**From the UI, in the background:**
|
|
41
41
|
|
|
42
42
|
```ts
|
|
43
|
-
import { sendToAgentChat } from "@agent-native/core";
|
|
43
|
+
import { sendToAgentChat } from "@agent-native/core/client";
|
|
44
44
|
|
|
45
45
|
sendToAgentChat({
|
|
46
46
|
message: "Analyze this import and create any missing records",
|
|
@@ -82,7 +82,7 @@ Do not call provider SDKs directly.
|
|
|
82
82
|
**From the UI, detecting when agent is done:**
|
|
83
83
|
|
|
84
84
|
```ts
|
|
85
|
-
import { useAgentChatGenerating } from "@agent-native/core";
|
|
85
|
+
import { useAgentChatGenerating } from "@agent-native/core/client";
|
|
86
86
|
|
|
87
87
|
function MyComponent() {
|
|
88
88
|
const isGenerating = useAgentChatGenerating();
|
|
@@ -25,7 +25,7 @@ The agent modifies data in SQL, but the UI runs in the browser. SSE bridges same
|
|
|
25
25
|
2. **Client** listens for sync events and updates per-source change counters:
|
|
26
26
|
|
|
27
27
|
```ts
|
|
28
|
-
import { useDbSync } from "@agent-native/core";
|
|
28
|
+
import { useDbSync } from "@agent-native/core/client";
|
|
29
29
|
useDbSync({ queryClient });
|
|
30
30
|
```
|
|
31
31
|
|