@agent-native/core 0.20.9 → 0.22.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/action.d.ts +61 -0
- package/dist/action.d.ts.map +1 -1
- package/dist/action.js +14 -0
- package/dist/action.js.map +1 -1
- package/dist/agent/production-agent.d.ts +4 -0
- package/dist/agent/production-agent.d.ts.map +1 -1
- package/dist/agent/production-agent.js +19 -7
- package/dist/agent/production-agent.js.map +1 -1
- package/dist/agent/types.d.ts +2 -0
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/agent/types.js.map +1 -1
- package/dist/cli/code-agent-executor.d.ts.map +1 -1
- package/dist/cli/code-agent-executor.js +1 -0
- package/dist/cli/code-agent-executor.js.map +1 -1
- package/dist/cli/connect.d.ts +18 -3
- package/dist/cli/connect.d.ts.map +1 -1
- package/dist/cli/connect.js +619 -19
- package/dist/cli/connect.js.map +1 -1
- package/dist/client/AgentPanel.d.ts.map +1 -1
- package/dist/client/AgentPanel.js +6 -2
- package/dist/client/AgentPanel.js.map +1 -1
- package/dist/client/AssistantChat.d.ts.map +1 -1
- package/dist/client/AssistantChat.js +13 -6
- package/dist/client/AssistantChat.js.map +1 -1
- package/dist/client/NewWorkspaceAppFlow.js +1 -1
- package/dist/client/NewWorkspaceAppFlow.js.map +1 -1
- package/dist/client/agent-chat.d.ts.map +1 -1
- package/dist/client/agent-chat.js +13 -8
- package/dist/client/agent-chat.js.map +1 -1
- package/dist/client/agent-sidebar-state.d.ts +2 -0
- package/dist/client/agent-sidebar-state.d.ts.map +1 -1
- package/dist/client/agent-sidebar-state.js +40 -0
- package/dist/client/agent-sidebar-state.js.map +1 -1
- package/dist/client/code-agent-chat-adapter.js +1 -0
- package/dist/client/code-agent-chat-adapter.js.map +1 -1
- package/dist/client/conversation/AgentConversation.d.ts.map +1 -1
- package/dist/client/conversation/AgentConversation.js +3 -2
- package/dist/client/conversation/AgentConversation.js.map +1 -1
- package/dist/client/conversation/code-agent-transcript.js +1 -0
- package/dist/client/conversation/code-agent-transcript.js.map +1 -1
- package/dist/client/conversation/types.d.ts +2 -0
- package/dist/client/conversation/types.d.ts.map +1 -1
- package/dist/client/conversation/types.js.map +1 -1
- package/dist/client/index.d.ts +1 -0
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +1 -0
- package/dist/client/index.js.map +1 -1
- package/dist/client/mcp-apps/McpAppRenderer.d.ts +10 -0
- package/dist/client/mcp-apps/McpAppRenderer.d.ts.map +1 -0
- package/dist/client/mcp-apps/McpAppRenderer.js +301 -0
- package/dist/client/mcp-apps/McpAppRenderer.js.map +1 -0
- package/dist/client/sse-event-processor.d.ts +3 -0
- package/dist/client/sse-event-processor.d.ts.map +1 -1
- package/dist/client/sse-event-processor.js +2 -0
- package/dist/client/sse-event-processor.js.map +1 -1
- package/dist/client/use-db-sync.d.ts +5 -5
- package/dist/client/use-db-sync.d.ts.map +1 -1
- package/dist/client/use-db-sync.js +15 -5
- package/dist/client/use-db-sync.js.map +1 -1
- package/dist/client/use-db-sync.spec.d.ts +2 -0
- package/dist/client/use-db-sync.spec.d.ts.map +1 -0
- package/dist/client/use-db-sync.spec.js +80 -0
- package/dist/client/use-db-sync.spec.js.map +1 -0
- package/dist/code-agents/transcript-normalizer.d.ts +2 -0
- package/dist/code-agents/transcript-normalizer.d.ts.map +1 -1
- package/dist/code-agents/transcript-normalizer.js +17 -0
- package/dist/code-agents/transcript-normalizer.js.map +1 -1
- package/dist/db/client.d.ts.map +1 -1
- package/dist/db/client.js +29 -21
- package/dist/db/client.js.map +1 -1
- package/dist/extensions/actions.d.ts.map +1 -1
- package/dist/extensions/actions.js +62 -3
- package/dist/extensions/actions.js.map +1 -1
- package/dist/extensions/content-patch.d.ts +71 -0
- package/dist/extensions/content-patch.d.ts.map +1 -0
- package/dist/extensions/content-patch.js +251 -0
- package/dist/extensions/content-patch.js.map +1 -0
- package/dist/extensions/routes.js +6 -1
- package/dist/extensions/routes.js.map +1 -1
- package/dist/extensions/store.d.ts +4 -4
- package/dist/extensions/store.d.ts.map +1 -1
- package/dist/extensions/store.js +14 -18
- package/dist/extensions/store.js.map +1 -1
- package/dist/index.browser.d.ts +1 -1
- package/dist/index.browser.d.ts.map +1 -1
- package/dist/index.browser.js +1 -1
- package/dist/index.browser.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/mcp/build-server.d.ts +3 -0
- package/dist/mcp/build-server.d.ts.map +1 -1
- package/dist/mcp/build-server.js +207 -8
- package/dist/mcp/build-server.js.map +1 -1
- package/dist/mcp/oauth-route.d.ts +22 -0
- package/dist/mcp/oauth-route.d.ts.map +1 -0
- package/dist/mcp/oauth-route.js +618 -0
- package/dist/mcp/oauth-route.js.map +1 -0
- package/dist/mcp/oauth-store.d.ts +89 -0
- package/dist/mcp/oauth-store.d.ts.map +1 -0
- package/dist/mcp/oauth-store.js +391 -0
- package/dist/mcp/oauth-store.js.map +1 -0
- package/dist/mcp/oauth-token.d.ts +28 -0
- package/dist/mcp/oauth-token.d.ts.map +1 -0
- package/dist/mcp/oauth-token.js +83 -0
- package/dist/mcp/oauth-token.js.map +1 -0
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +5 -2
- package/dist/mcp/server.js.map +1 -1
- package/dist/mcp/stdio.d.ts +2 -2
- package/dist/mcp/stdio.d.ts.map +1 -1
- package/dist/mcp/stdio.js +26 -8
- package/dist/mcp/stdio.js.map +1 -1
- package/dist/mcp-client/app-result.d.ts +40 -0
- package/dist/mcp-client/app-result.d.ts.map +1 -0
- package/dist/mcp-client/app-result.js +19 -0
- package/dist/mcp-client/app-result.js.map +1 -0
- package/dist/mcp-client/index.d.ts +5 -2
- package/dist/mcp-client/index.d.ts.map +1 -1
- package/dist/mcp-client/index.js +201 -25
- package/dist/mcp-client/index.js.map +1 -1
- package/dist/mcp-client/manager.d.ts +16 -0
- package/dist/mcp-client/manager.d.ts.map +1 -1
- package/dist/mcp-client/manager.js +58 -1
- package/dist/mcp-client/manager.js.map +1 -1
- package/dist/mcp-client/routes.d.ts +4 -1
- package/dist/mcp-client/routes.d.ts.map +1 -1
- package/dist/mcp-client/routes.js +159 -0
- package/dist/mcp-client/routes.js.map +1 -1
- package/dist/scripts/dev/shell.d.ts.map +1 -1
- package/dist/scripts/dev/shell.js +24 -1
- package/dist/scripts/dev/shell.js.map +1 -1
- package/dist/server/agent-chat-plugin.d.ts.map +1 -1
- package/dist/server/agent-chat-plugin.js +3 -2
- package/dist/server/agent-chat-plugin.js.map +1 -1
- package/dist/server/auth.d.ts.map +1 -1
- package/dist/server/auth.js +14 -8
- package/dist/server/auth.js.map +1 -1
- package/dist/server/builder-browser.d.ts +6 -0
- package/dist/server/builder-browser.d.ts.map +1 -1
- package/dist/server/builder-browser.js +15 -0
- package/dist/server/builder-browser.js.map +1 -1
- package/dist/server/core-routes-plugin.d.ts +5 -4
- package/dist/server/core-routes-plugin.d.ts.map +1 -1
- package/dist/server/core-routes-plugin.js +17 -2
- package/dist/server/core-routes-plugin.js.map +1 -1
- package/dist/styles/agent-conversation.css +53 -0
- package/dist/templates/default/.agents/skills/actions/SKILL.md +193 -72
- package/dist/templates/default/.agents/skills/real-time-sync/SKILL.md +88 -38
- package/dist/templates/default/AGENTS.md +3 -3
- package/dist/templates/default/actions/hello.ts +13 -20
- package/dist/templates/default/actions/navigate.ts +19 -51
- package/dist/templates/default/actions/view-screen.ts +16 -33
- package/dist/templates/default/app/hooks/use-navigation-state.ts +13 -3
- package/dist/templates/default/app/lib/tab-id.ts +1 -0
- package/dist/templates/default/app/root.tsx +2 -1
- package/dist/templates/default/app/routes/_index.tsx +11 -0
- package/dist/templates/default/package.json +2 -1
- package/dist/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +9 -1
- package/dist/templates/workspace-core/AGENTS.md +8 -0
- package/dist/templates/workspace-root/AGENTS.md +7 -0
- package/dist/vite/client.d.ts.map +1 -1
- package/dist/vite/client.js +2 -2
- package/dist/vite/client.js.map +1 -1
- package/docs/content/actions.md +26 -3
- package/docs/content/authentication.md +16 -1
- package/docs/content/client.md +11 -8
- package/docs/content/context-awareness.md +2 -3
- package/docs/content/creating-templates.md +2 -2
- package/docs/content/external-agents.md +106 -19
- package/docs/content/faq.md +2 -2
- package/docs/content/key-concepts.md +31 -23
- package/docs/content/mcp-clients.md +1 -1
- package/docs/content/mcp-protocol.md +65 -27
- package/docs/content/template-starter.md +3 -3
- package/docs/content/what-is-agent-native.md +4 -2
- package/package.json +3 -1
- package/src/templates/default/.agents/skills/actions/SKILL.md +193 -72
- package/src/templates/default/.agents/skills/real-time-sync/SKILL.md +88 -38
- package/src/templates/default/AGENTS.md +3 -3
- package/src/templates/default/actions/hello.ts +13 -20
- package/src/templates/default/actions/navigate.ts +19 -51
- package/src/templates/default/actions/view-screen.ts +16 -33
- package/src/templates/default/app/hooks/use-navigation-state.ts +13 -3
- package/src/templates/default/app/lib/tab-id.ts +1 -0
- package/src/templates/default/app/root.tsx +2 -1
- package/src/templates/default/app/routes/_index.tsx +11 -0
- package/src/templates/default/package.json +2 -1
- package/src/templates/workspace-core/.agents/skills/real-time-sync/SKILL.md +9 -1
- package/src/templates/workspace-core/AGENTS.md +8 -0
- package/src/templates/workspace-root/AGENTS.md +7 -0
- package/dist/templates/default/server/routes/api/hello.get.ts +0 -5
- package/dist/templates/default/shared/api.ts +0 -6
- package/src/templates/default/server/routes/api/hello.get.ts +0 -5
- package/src/templates/default/shared/api.ts +0 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentConversation.js","sourceRoot":"","sources":["../../../src/client/conversation/AgentConversation.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,aAAa,EAAE,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,SAAS,MAAM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,mEAAmE,aAChF,eAAM,SAAS,EAAC,qCAAqC,YAClD,UAAU,CAAC,IAAI,GACX,EACN,UAAU,CAAC,IAAI,KAAK,SAAS,IAAI,CAChC,eAAM,SAAS,EAAC,qCAAqC,YAClD,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC,GACxB,CACR,IACG,CACP,CAAC;AACJ,CAAC;AAED,SAAS,WAAW,CAAC,KAAa;IAChC,IAAI,KAAK,GAAG,IAAI;QAAE,OAAO,GAAG,KAAK,IAAI,CAAC;IACtC,IAAI,KAAK,GAAG,IAAI,GAAG,IAAI;QAAE,OAAO,GAAG,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC;IAClE,OAAO,GAAG,CAAC,KAAK,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC;AACpD,CAAC","sourcesContent":["import React, { useEffect, useState } from \"react\";\nimport ReactMarkdown, { defaultUrlTransform } from \"react-markdown\";\nimport remarkGfm from \"remark-gfm\";\nimport {\n IconAlertTriangle,\n IconArrowDown,\n IconCheck,\n IconChevronDown,\n IconCircleX,\n IconClock,\n IconExternalLink,\n IconLoader2,\n IconTool,\n} from \"@tabler/icons-react\";\nimport { cn } from \"../utils.js\";\nimport { useNearBottomAutoscroll } from \"./use-near-bottom-autoscroll.js\";\nimport type {\n AgentConversationAttachment,\n AgentConversationArtifact,\n AgentConversationMessage,\n AgentConversationMessagePart,\n AgentConversationNotice,\n AgentConversationToolCall,\n} from \"./types.js\";\n\nexport interface AgentConversationProps {\n messages: AgentConversationMessage[];\n loading?: boolean;\n error?: string | null;\n streaming?: boolean;\n className?: string;\n timelineClassName?: string;\n emptyTitle?: string;\n emptyDescription?: string;\n composer?: React.ReactNode;\n}\n\nexport function AgentConversation({\n messages,\n loading = false,\n error,\n streaming = false,\n className,\n timelineClassName,\n emptyTitle = \"No messages yet\",\n emptyDescription,\n composer,\n}: AgentConversationProps) {\n const followKey = `${messages.length}:${\n messages[messages.length - 1]?.text?.length ?? 0\n }`;\n const { scrollRef, showScrollToBottom, scrollToBottom } =\n useNearBottomAutoscroll<HTMLDivElement>({\n followKey,\n streaming,\n });\n\n return (\n <section className={cn(\"agent-conversation\", className)}>\n {error && (\n <div className=\"agent-conversation__error\" role=\"alert\">\n <IconAlertTriangle size={15} strokeWidth={1.8} />\n <span>{error}</span>\n </div>\n )}\n <div\n ref={scrollRef}\n className={cn(\"agent-conversation__timeline\", timelineClassName)}\n >\n {loading && messages.length === 0 ? (\n <ConversationEmpty\n icon={<IconLoader2 size={17} className=\"agent-conversation-spin\" />}\n title=\"Loading session...\"\n />\n ) : messages.length === 0 ? (\n <ConversationEmpty\n icon={<IconClock size={18} />}\n title={emptyTitle}\n description={emptyDescription}\n />\n ) : (\n messages.map((message) => (\n <AgentConversationMessageView key={message.id} message={message} />\n ))\n )}\n </div>\n {showScrollToBottom && (\n <button\n type=\"button\"\n className=\"agent-conversation__scroll-bottom\"\n onClick={scrollToBottom}\n aria-label=\"Scroll to bottom\"\n >\n <IconArrowDown size={15} strokeWidth={1.9} />\n </button>\n )}\n {composer}\n </section>\n );\n}\n\nfunction ConversationEmpty({\n icon,\n title,\n description,\n}: {\n icon: React.ReactNode;\n title: string;\n description?: string;\n}) {\n return (\n <div className=\"agent-conversation__empty\">\n {icon}\n <p>{title}</p>\n {description && <span>{description}</span>}\n </div>\n );\n}\n\nexport function AgentConversationMessageView({\n message,\n}: {\n message: AgentConversationMessage;\n}) {\n const parts = message.parts ?? legacyPartsForMessage(message);\n\n return (\n <article\n className={cn(\n \"agent-conversation-message\",\n `agent-conversation-message--${message.role}`,\n message.pending && \"agent-conversation-message--pending\",\n )}\n >\n {message.attachments && message.attachments.length > 0 && (\n <div className=\"agent-conversation-message__attachments\">\n {message.attachments.map((attachment, i) => (\n <ConversationAttachmentChip\n key={`${attachment.name}-${i}`}\n attachment={attachment}\n />\n ))}\n </div>\n )}\n <div className=\"agent-conversation-message__body\">\n {parts.map((part) => (\n <ConversationMessagePartView key={part.id} part={part} />\n ))}\n </div>\n </article>\n );\n}\n\nfunction legacyPartsForMessage(\n message: AgentConversationMessage,\n): AgentConversationMessagePart[] {\n return [\n ...(message.text\n ? [\n {\n id: `${message.id}-text`,\n type: \"text\" as const,\n text: message.text,\n },\n ]\n : []),\n ...(message.tools ?? []).map((tool) => ({\n id: `${message.id}-tool-${tool.id}`,\n type: \"tool\" as const,\n tool,\n })),\n ...(message.notices ?? []).map((notice) => ({\n id: `${message.id}-notice-${notice.id}`,\n type: \"notice\" as const,\n notice,\n })),\n ...(message.artifacts ?? []).map((artifact) => ({\n id: `${message.id}-artifact-${artifact.id}`,\n type: \"artifact\" as const,\n artifact,\n })),\n ];\n}\n\nfunction ConversationMessagePartView({\n part,\n}: {\n part: AgentConversationMessagePart;\n}) {\n return (\n <div\n className={cn(\n \"agent-conversation-message__part\",\n `agent-conversation-message__part--${part.type}`,\n )}\n >\n {part.type === \"text\" ? (\n <ConversationMarkdown text={part.text} />\n ) : part.type === \"tool\" ? (\n <ConversationToolCall tool={part.tool} />\n ) : part.type === \"notice\" ? (\n <ConversationNotice notice={part.notice} />\n ) : (\n <ConversationArtifact artifact={part.artifact} />\n )}\n </div>\n );\n}\n\n// ─── Shiki syntax highlighter (lazy-loaded) ──────────────────────────────────\ntype ShikiHighlighter = {\n codeToHtml: (\n code: string,\n options: {\n lang: string;\n themes: { light: string; dark: string };\n defaultColor?: false | \"light\" | \"dark\";\n },\n ) => string | Promise<string>;\n getLoadedLanguages: () => string[];\n};\n\nlet _highlighterLoader: Promise<ShikiHighlighter> | null = null;\nfunction loadConversationHighlighter(): Promise<ShikiHighlighter> {\n if (!_highlighterLoader) {\n _highlighterLoader = (async () => {\n const [{ createHighlighterCore }, { createOnigurumaEngine }] =\n await Promise.all([\n import(\"shiki/core\"),\n import(\"shiki/engine/oniguruma\"),\n ]);\n return createHighlighterCore({\n themes: [\n import(\"shiki/themes/github-light-default.mjs\"),\n import(\"shiki/themes/github-dark-default.mjs\"),\n ],\n langs: [\n import(\"shiki/langs/javascript.mjs\"),\n import(\"shiki/langs/typescript.mjs\"),\n import(\"shiki/langs/jsx.mjs\"),\n import(\"shiki/langs/tsx.mjs\"),\n import(\"shiki/langs/json.mjs\"),\n import(\"shiki/langs/css.mjs\"),\n import(\"shiki/langs/html.mjs\"),\n import(\"shiki/langs/markdown.mjs\"),\n import(\"shiki/langs/bash.mjs\"),\n import(\"shiki/langs/shellscript.mjs\"),\n import(\"shiki/langs/python.mjs\"),\n import(\"shiki/langs/yaml.mjs\"),\n import(\"shiki/langs/sql.mjs\"),\n ],\n engine: createOnigurumaEngine(import(\"shiki/wasm\")),\n }) as unknown as Promise<ShikiHighlighter>;\n })().catch((err) => {\n _highlighterLoader = null;\n throw err;\n });\n }\n return _highlighterLoader;\n}\n\nconst LANG_ALIASES: Record<string, string> = {\n js: \"javascript\",\n ts: \"typescript\",\n sh: \"bash\",\n shell: \"bash\",\n zsh: \"bash\",\n py: \"python\",\n yml: \"yaml\",\n md: \"markdown\",\n bq: \"sql\",\n bigquery: \"sql\",\n};\n\nfunction HighlightedCodeBlock({ code, lang }: { code: string; lang: string }) {\n const [html, setHtml] = useState<string | null>(null);\n\n useEffect(() => {\n let cancelled = false;\n loadConversationHighlighter()\n .then((highlighter) => {\n const requested = (lang || \"text\").toLowerCase();\n const resolved = LANG_ALIASES[requested] ?? requested;\n const loaded = highlighter.getLoadedLanguages();\n const finalLang = loaded.includes(resolved) ? resolved : \"text\";\n return highlighter.codeToHtml(code, {\n lang: finalLang,\n themes: {\n light: \"github-light-default\",\n dark: \"github-dark-default\",\n },\n defaultColor: false,\n });\n })\n .then((out) => {\n if (!cancelled) setHtml(out as string);\n })\n .catch(() => {\n if (!cancelled) setHtml(null);\n });\n return () => {\n cancelled = true;\n };\n }, [code, lang]);\n\n if (html) {\n return (\n <div\n className=\"agent-conversation-shiki\"\n dangerouslySetInnerHTML={{ __html: html }}\n />\n );\n }\n return (\n <pre>\n <code className={lang ? `language-${lang}` : undefined}>{code}</code>\n </pre>\n );\n}\n\nfunction ConversationMarkdown({ text }: { text: string }) {\n return (\n <div className=\"agent-conversation-markdown\">\n <ReactMarkdown\n remarkPlugins={[remarkGfm]}\n urlTransform={(url) => {\n if (url.startsWith(\"file://\")) return url;\n return defaultUrlTransform(url);\n }}\n components={{\n a({ children, href }) {\n return (\n <a\n href={href}\n target=\"_blank\"\n rel=\"noreferrer\"\n onClick={(event) => openMarkdownLink(event, href)}\n >\n {children}\n </a>\n );\n },\n pre(props: React.HTMLAttributes<HTMLPreElement>) {\n const { children, ...rest } = props;\n if (React.isValidElement(children)) {\n const childProps = children.props as {\n className?: string;\n children?: React.ReactNode;\n };\n const langMatch = (childProps.className ?? \"\").match(\n /\\blanguage-([\\w+-]+)\\b/,\n );\n if (langMatch) {\n const code = extractCodeText(childProps.children).replace(\n /\\n$/,\n \"\",\n );\n return <HighlightedCodeBlock code={code} lang={langMatch[1]} />;\n }\n }\n return <pre {...rest}>{children}</pre>;\n },\n }}\n >\n {text}\n </ReactMarkdown>\n </div>\n );\n}\n\nfunction extractCodeText(node: React.ReactNode): string {\n if (typeof node === \"string\") return node;\n if (typeof node === \"number\") return String(node);\n if (Array.isArray(node)) return node.map(extractCodeText).join(\"\");\n if (React.isValidElement(node)) {\n return extractCodeText(\n (node.props as { children?: React.ReactNode }).children,\n );\n }\n return \"\";\n}\n\nfunction openMarkdownLink(\n event: React.MouseEvent<HTMLAnchorElement>,\n href: string | undefined,\n) {\n if (!href) return;\n\n let url: URL;\n try {\n url = new URL(href, window.location.href);\n } catch {\n return;\n }\n\n if (![\"http:\", \"https:\", \"mailto:\", \"tel:\"].includes(url.protocol)) return;\n event.preventDefault();\n window.open(url.href, \"_blank\", \"noopener,noreferrer\");\n}\n\nfunction ConversationToolCall({ tool }: { tool: AgentConversationToolCall }) {\n const hasDetails = Boolean(tool.input || tool.result);\n const icon =\n tool.state === \"running\" || tool.state === \"activity\" ? (\n <IconLoader2 size={14} className=\"agent-conversation-spin\" />\n ) : tool.state === \"errored\" ? (\n <IconCircleX size={14} />\n ) : (\n <IconCheck size={14} />\n );\n\n const content = (\n <>\n <span className=\"agent-conversation-tool__icon\">{icon}</span>\n <span className=\"agent-conversation-tool__name\">{tool.name}</span>\n {tool.summary && (\n <span className=\"agent-conversation-tool__summary\">{tool.summary}</span>\n )}\n </>\n );\n\n if (!hasDetails) {\n return <div className=\"agent-conversation-tool\">{content}</div>;\n }\n\n return (\n <details className=\"agent-conversation-tool\">\n <summary>\n {content}\n <IconChevronDown\n size={13}\n className=\"agent-conversation-tool__chevron\"\n />\n </summary>\n <div className=\"agent-conversation-tool__details\">\n {tool.input && (\n <pre>\n <strong>input</strong>\n {tool.input}\n </pre>\n )}\n {tool.result && (\n <pre>\n <strong>result</strong>\n {tool.result}\n </pre>\n )}\n </div>\n </details>\n );\n}\n\nfunction ConversationNotice({ notice }: { notice: AgentConversationNotice }) {\n return (\n <div\n className={cn(\n \"agent-conversation-notice\",\n `agent-conversation-notice--${notice.tone}`,\n )}\n >\n <IconAlertTriangle size={15} />\n <div>\n {notice.title && <strong>{notice.title}</strong>}\n <span>{notice.text}</span>\n </div>\n {notice.action}\n </div>\n );\n}\n\nfunction ConversationArtifact({\n artifact,\n}: {\n artifact: AgentConversationArtifact;\n}) {\n return (\n <div className=\"agent-conversation-artifact\">\n <IconTool size={14} />\n {artifact.path ? (\n <code>{artifact.path}</code>\n ) : (\n <span>{artifact.label}</span>\n )}\n {artifact.url && (\n <a href={artifact.url} target=\"_blank\" rel=\"noreferrer\">\n <IconExternalLink size={13} />\n Open\n </a>\n )}\n </div>\n );\n}\n\nfunction ConversationAttachmentChip({\n attachment,\n}: {\n attachment: AgentConversationAttachment;\n}) {\n if (attachment.dataUrl) {\n return (\n <div className=\"agent-conversation-attachment agent-conversation-attachment--image\">\n <img\n src={attachment.dataUrl}\n alt={attachment.name}\n className=\"agent-conversation-attachment__image\"\n />\n <span className=\"agent-conversation-attachment__name\">\n {attachment.name}\n </span>\n </div>\n );\n }\n return (\n <div className=\"agent-conversation-attachment agent-conversation-attachment--file\">\n <span className=\"agent-conversation-attachment__name\">\n {attachment.name}\n </span>\n {attachment.size !== undefined && (\n <span className=\"agent-conversation-attachment__size\">\n {formatBytes(attachment.size)}\n </span>\n )}\n </div>\n );\n}\n\nfunction formatBytes(bytes: number): string {\n if (bytes < 1024) return `${bytes} B`;\n if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;\n return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"AgentConversation.js","sourceRoot":"","sources":["../../../src/client/conversation/AgentConversation.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,aAAa,EAAE,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACpE,OAAO,SAAS,MAAM,YAAY,CAAC;AACnC,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,SAAS,EACT,eAAe,EACf,WAAW,EACX,SAAS,EACT,gBAAgB,EAChB,WAAW,EACX,QAAQ,GACT,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AAsB1E,MAAM,UAAU,iBAAiB,CAAC,EAChC,QAAQ,EACR,OAAO,GAAG,KAAK,EACf,KAAK,EACL,SAAS,GAAG,KAAK,EACjB,SAAS,EACT,iBAAiB,EACjB,UAAU,GAAG,iBAAiB,EAC9B,gBAAgB,EAChB,QAAQ,GACe;IACvB,MAAM,SAAS,GAAG,GAAG,QAAQ,CAAC,MAAM,IAClC,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,C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AI;QAAE,OAAO,GAAG,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC;IAClE,OAAO,GAAG,CAAC,KAAK,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC;AACpD,CAAC","sourcesContent":["import React, { useEffect, useState } from \"react\";\nimport ReactMarkdown, { defaultUrlTransform } from \"react-markdown\";\nimport remarkGfm from \"remark-gfm\";\nimport {\n IconAlertTriangle,\n IconArrowDown,\n IconCheck,\n IconChevronDown,\n IconCircleX,\n IconClock,\n IconExternalLink,\n IconLoader2,\n IconTool,\n} from \"@tabler/icons-react\";\nimport { cn } from \"../utils.js\";\nimport { McpAppRenderer } from \"../mcp-apps/McpAppRenderer.js\";\nimport { useNearBottomAutoscroll } from \"./use-near-bottom-autoscroll.js\";\nimport type {\n AgentConversationAttachment,\n AgentConversationArtifact,\n AgentConversationMessage,\n AgentConversationMessagePart,\n AgentConversationNotice,\n AgentConversationToolCall,\n} from \"./types.js\";\n\nexport interface AgentConversationProps {\n messages: AgentConversationMessage[];\n loading?: boolean;\n error?: string | null;\n streaming?: boolean;\n className?: string;\n timelineClassName?: string;\n emptyTitle?: string;\n emptyDescription?: string;\n composer?: React.ReactNode;\n}\n\nexport function AgentConversation({\n messages,\n loading = false,\n error,\n streaming = false,\n className,\n timelineClassName,\n emptyTitle = \"No messages yet\",\n emptyDescription,\n composer,\n}: AgentConversationProps) {\n const followKey = `${messages.length}:${\n messages[messages.length - 1]?.text?.length ?? 0\n }`;\n const { scrollRef, showScrollToBottom, scrollToBottom } =\n useNearBottomAutoscroll<HTMLDivElement>({\n followKey,\n streaming,\n });\n\n return (\n <section className={cn(\"agent-conversation\", className)}>\n {error && (\n <div className=\"agent-conversation__error\" role=\"alert\">\n <IconAlertTriangle size={15} strokeWidth={1.8} />\n <span>{error}</span>\n </div>\n )}\n <div\n ref={scrollRef}\n className={cn(\"agent-conversation__timeline\", timelineClassName)}\n >\n {loading && messages.length === 0 ? (\n <ConversationEmpty\n icon={<IconLoader2 size={17} className=\"agent-conversation-spin\" />}\n title=\"Loading session...\"\n />\n ) : messages.length === 0 ? (\n <ConversationEmpty\n icon={<IconClock size={18} />}\n title={emptyTitle}\n description={emptyDescription}\n />\n ) : (\n messages.map((message) => (\n <AgentConversationMessageView key={message.id} message={message} />\n ))\n )}\n </div>\n {showScrollToBottom && (\n <button\n type=\"button\"\n className=\"agent-conversation__scroll-bottom\"\n onClick={scrollToBottom}\n aria-label=\"Scroll to bottom\"\n >\n <IconArrowDown size={15} strokeWidth={1.9} />\n </button>\n )}\n {composer}\n </section>\n );\n}\n\nfunction ConversationEmpty({\n icon,\n title,\n description,\n}: {\n icon: React.ReactNode;\n title: string;\n description?: string;\n}) {\n return (\n <div className=\"agent-conversation__empty\">\n {icon}\n <p>{title}</p>\n {description && <span>{description}</span>}\n </div>\n );\n}\n\nexport function AgentConversationMessageView({\n message,\n}: {\n message: AgentConversationMessage;\n}) {\n const parts = message.parts ?? legacyPartsForMessage(message);\n\n return (\n <article\n className={cn(\n \"agent-conversation-message\",\n `agent-conversation-message--${message.role}`,\n message.pending && \"agent-conversation-message--pending\",\n )}\n >\n {message.attachments && message.attachments.length > 0 && (\n <div className=\"agent-conversation-message__attachments\">\n {message.attachments.map((attachment, i) => (\n <ConversationAttachmentChip\n key={`${attachment.name}-${i}`}\n attachment={attachment}\n />\n ))}\n </div>\n )}\n <div className=\"agent-conversation-message__body\">\n {parts.map((part) => (\n <ConversationMessagePartView key={part.id} part={part} />\n ))}\n </div>\n </article>\n );\n}\n\nfunction legacyPartsForMessage(\n message: AgentConversationMessage,\n): AgentConversationMessagePart[] {\n return [\n ...(message.text\n ? [\n {\n id: `${message.id}-text`,\n type: \"text\" as const,\n text: message.text,\n },\n ]\n : []),\n ...(message.tools ?? []).map((tool) => ({\n id: `${message.id}-tool-${tool.id}`,\n type: \"tool\" as const,\n tool,\n })),\n ...(message.notices ?? []).map((notice) => ({\n id: `${message.id}-notice-${notice.id}`,\n type: \"notice\" as const,\n notice,\n })),\n ...(message.artifacts ?? []).map((artifact) => ({\n id: `${message.id}-artifact-${artifact.id}`,\n type: \"artifact\" as const,\n artifact,\n })),\n ];\n}\n\nfunction ConversationMessagePartView({\n part,\n}: {\n part: AgentConversationMessagePart;\n}) {\n return (\n <div\n className={cn(\n \"agent-conversation-message__part\",\n `agent-conversation-message__part--${part.type}`,\n )}\n >\n {part.type === \"text\" ? (\n <ConversationMarkdown text={part.text} />\n ) : part.type === \"tool\" ? (\n <ConversationToolCall tool={part.tool} />\n ) : part.type === \"notice\" ? (\n <ConversationNotice notice={part.notice} />\n ) : (\n <ConversationArtifact artifact={part.artifact} />\n )}\n </div>\n );\n}\n\n// ─── Shiki syntax highlighter (lazy-loaded) ──────────────────────────────────\ntype ShikiHighlighter = {\n codeToHtml: (\n code: string,\n options: {\n lang: string;\n themes: { light: string; dark: string };\n defaultColor?: false | \"light\" | \"dark\";\n },\n ) => string | Promise<string>;\n getLoadedLanguages: () => string[];\n};\n\nlet _highlighterLoader: Promise<ShikiHighlighter> | null = null;\nfunction loadConversationHighlighter(): Promise<ShikiHighlighter> {\n if (!_highlighterLoader) {\n _highlighterLoader = (async () => {\n const [{ createHighlighterCore }, { createOnigurumaEngine }] =\n await Promise.all([\n import(\"shiki/core\"),\n import(\"shiki/engine/oniguruma\"),\n ]);\n return createHighlighterCore({\n themes: [\n import(\"shiki/themes/github-light-default.mjs\"),\n import(\"shiki/themes/github-dark-default.mjs\"),\n ],\n langs: [\n import(\"shiki/langs/javascript.mjs\"),\n import(\"shiki/langs/typescript.mjs\"),\n import(\"shiki/langs/jsx.mjs\"),\n import(\"shiki/langs/tsx.mjs\"),\n import(\"shiki/langs/json.mjs\"),\n import(\"shiki/langs/css.mjs\"),\n import(\"shiki/langs/html.mjs\"),\n import(\"shiki/langs/markdown.mjs\"),\n import(\"shiki/langs/bash.mjs\"),\n import(\"shiki/langs/shellscript.mjs\"),\n import(\"shiki/langs/python.mjs\"),\n import(\"shiki/langs/yaml.mjs\"),\n import(\"shiki/langs/sql.mjs\"),\n ],\n engine: createOnigurumaEngine(import(\"shiki/wasm\")),\n }) as unknown as Promise<ShikiHighlighter>;\n })().catch((err) => {\n _highlighterLoader = null;\n throw err;\n });\n }\n return _highlighterLoader;\n}\n\nconst LANG_ALIASES: Record<string, string> = {\n js: \"javascript\",\n ts: \"typescript\",\n sh: \"bash\",\n shell: \"bash\",\n zsh: \"bash\",\n py: \"python\",\n yml: \"yaml\",\n md: \"markdown\",\n bq: \"sql\",\n bigquery: \"sql\",\n};\n\nfunction HighlightedCodeBlock({ code, lang }: { code: string; lang: string }) {\n const [html, setHtml] = useState<string | null>(null);\n\n useEffect(() => {\n let cancelled = false;\n loadConversationHighlighter()\n .then((highlighter) => {\n const requested = (lang || \"text\").toLowerCase();\n const resolved = LANG_ALIASES[requested] ?? requested;\n const loaded = highlighter.getLoadedLanguages();\n const finalLang = loaded.includes(resolved) ? resolved : \"text\";\n return highlighter.codeToHtml(code, {\n lang: finalLang,\n themes: {\n light: \"github-light-default\",\n dark: \"github-dark-default\",\n },\n defaultColor: false,\n });\n })\n .then((out) => {\n if (!cancelled) setHtml(out as string);\n })\n .catch(() => {\n if (!cancelled) setHtml(null);\n });\n return () => {\n cancelled = true;\n };\n }, [code, lang]);\n\n if (html) {\n return (\n <div\n className=\"agent-conversation-shiki\"\n dangerouslySetInnerHTML={{ __html: html }}\n />\n );\n }\n return (\n <pre>\n <code className={lang ? `language-${lang}` : undefined}>{code}</code>\n </pre>\n );\n}\n\nfunction ConversationMarkdown({ text }: { text: string }) {\n return (\n <div className=\"agent-conversation-markdown\">\n <ReactMarkdown\n remarkPlugins={[remarkGfm]}\n urlTransform={(url) => {\n if (url.startsWith(\"file://\")) return url;\n return defaultUrlTransform(url);\n }}\n components={{\n a({ children, href }) {\n return (\n <a\n href={href}\n target=\"_blank\"\n rel=\"noreferrer\"\n onClick={(event) => openMarkdownLink(event, href)}\n >\n {children}\n </a>\n );\n },\n pre(props: React.HTMLAttributes<HTMLPreElement>) {\n const { children, ...rest } = props;\n if (React.isValidElement(children)) {\n const childProps = children.props as {\n className?: string;\n children?: React.ReactNode;\n };\n const langMatch = (childProps.className ?? \"\").match(\n /\\blanguage-([\\w+-]+)\\b/,\n );\n if (langMatch) {\n const code = extractCodeText(childProps.children).replace(\n /\\n$/,\n \"\",\n );\n return <HighlightedCodeBlock code={code} lang={langMatch[1]} />;\n }\n }\n return <pre {...rest}>{children}</pre>;\n },\n }}\n >\n {text}\n </ReactMarkdown>\n </div>\n );\n}\n\nfunction extractCodeText(node: React.ReactNode): string {\n if (typeof node === \"string\") return node;\n if (typeof node === \"number\") return String(node);\n if (Array.isArray(node)) return node.map(extractCodeText).join(\"\");\n if (React.isValidElement(node)) {\n return extractCodeText(\n (node.props as { children?: React.ReactNode }).children,\n );\n }\n return \"\";\n}\n\nfunction openMarkdownLink(\n event: React.MouseEvent<HTMLAnchorElement>,\n href: string | undefined,\n) {\n if (!href) return;\n\n let url: URL;\n try {\n url = new URL(href, window.location.href);\n } catch {\n return;\n }\n\n if (![\"http:\", \"https:\", \"mailto:\", \"tel:\"].includes(url.protocol)) return;\n event.preventDefault();\n window.open(url.href, \"_blank\", \"noopener,noreferrer\");\n}\n\nfunction ConversationToolCall({ tool }: { tool: AgentConversationToolCall }) {\n const hasDetails = Boolean(tool.input || tool.result || tool.mcpApp);\n const icon =\n tool.state === \"running\" || tool.state === \"activity\" ? (\n <IconLoader2 size={14} className=\"agent-conversation-spin\" />\n ) : tool.state === \"errored\" ? (\n <IconCircleX size={14} />\n ) : (\n <IconCheck size={14} />\n );\n\n const content = (\n <>\n <span className=\"agent-conversation-tool__icon\">{icon}</span>\n <span className=\"agent-conversation-tool__name\">{tool.name}</span>\n {tool.summary && (\n <span className=\"agent-conversation-tool__summary\">{tool.summary}</span>\n )}\n </>\n );\n\n if (!hasDetails) {\n return <div className=\"agent-conversation-tool\">{content}</div>;\n }\n\n return (\n <details\n className=\"agent-conversation-tool\"\n open={tool.mcpApp ? true : undefined}\n >\n <summary>\n {content}\n <IconChevronDown\n size={13}\n className=\"agent-conversation-tool__chevron\"\n />\n </summary>\n <div className=\"agent-conversation-tool__details\">\n {tool.mcpApp && <McpAppRenderer app={tool.mcpApp} />}\n {tool.input && (\n <pre>\n <strong>input</strong>\n {tool.input}\n </pre>\n )}\n {tool.result && (\n <pre>\n <strong>result</strong>\n {tool.result}\n </pre>\n )}\n </div>\n </details>\n );\n}\n\nfunction ConversationNotice({ notice }: { notice: AgentConversationNotice }) {\n return (\n <div\n className={cn(\n \"agent-conversation-notice\",\n `agent-conversation-notice--${notice.tone}`,\n )}\n >\n <IconAlertTriangle size={15} />\n <div>\n {notice.title && <strong>{notice.title}</strong>}\n <span>{notice.text}</span>\n </div>\n {notice.action}\n </div>\n );\n}\n\nfunction ConversationArtifact({\n artifact,\n}: {\n artifact: AgentConversationArtifact;\n}) {\n return (\n <div className=\"agent-conversation-artifact\">\n <IconTool size={14} />\n {artifact.path ? (\n <code>{artifact.path}</code>\n ) : (\n <span>{artifact.label}</span>\n )}\n {artifact.url && (\n <a href={artifact.url} target=\"_blank\" rel=\"noreferrer\">\n <IconExternalLink size={13} />\n Open\n </a>\n )}\n </div>\n );\n}\n\nfunction ConversationAttachmentChip({\n attachment,\n}: {\n attachment: AgentConversationAttachment;\n}) {\n if (attachment.dataUrl) {\n return (\n <div className=\"agent-conversation-attachment agent-conversation-attachment--image\">\n <img\n src={attachment.dataUrl}\n alt={attachment.name}\n className=\"agent-conversation-attachment__image\"\n />\n <span className=\"agent-conversation-attachment__name\">\n {attachment.name}\n </span>\n </div>\n );\n }\n return (\n <div className=\"agent-conversation-attachment agent-conversation-attachment--file\">\n <span className=\"agent-conversation-attachment__name\">\n {attachment.name}\n </span>\n {attachment.size !== undefined && (\n <span className=\"agent-conversation-attachment__size\">\n {formatBytes(attachment.size)}\n </span>\n )}\n </div>\n );\n}\n\nfunction formatBytes(bytes: number): string {\n if (bytes < 1024) return `${bytes} B`;\n if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(1)} KB`;\n return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;\n}\n"]}
|
|
@@ -113,6 +113,7 @@ function toConversationTool(item) {
|
|
|
113
113
|
: "running",
|
|
114
114
|
input: preview(item.input),
|
|
115
115
|
result: preview(item.result),
|
|
116
|
+
...(item.mcpApp ? { mcpApp: item.mcpApp } : {}),
|
|
116
117
|
summary: item.state === "completed"
|
|
117
118
|
? "finished"
|
|
118
119
|
: item.state === "activity"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"code-agent-transcript.js","sourceRoot":"","sources":["../../../src/client/conversation/code-agent-transcript.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,GAK7B,MAAM,4CAA4C,CAAC;AAwCpD,MAAM,UAAU,2CAA2C,CACzD,MAAuD,EACvD,UAA+C,EAAE;IAEjD,MAAM,UAAU,GAAG,4BAA4B,CAC7C,MAAM,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAClC,CAAC;IACF,MAAM,QAAQ,GAA+B,EAAE,CAAC;IAChD,MAAM,eAAe,GAAG,IAAI,GAAG,EAAoC,CAAC;IAEpE,MAAM,gBAAgB,GAAG,CAAC,IAAuC,EAAE,EAAE;QACnE,MAAM,QAAQ,GAAG,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACrD,IAAI,QAAQ;YAAE,OAAO,QAAQ,CAAC;QAC9B,MAAM,OAAO,GAA6B;YACxC,EAAE,EAAE,aAAa,IAAI,CAAC,EAAE,EAAE;YAC1B,IAAI,EAAE,WAAW;YACjB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,IAAI,EAAE,EAAE;YACR,KAAK,EAAE,EAAE;YACT,KAAK,EAAE,EAAE;YACT,OAAO,EAAE,EAAE;YACX,SAAS,EAAE,EAAE;SACd,CAAC;QACF,eAAe,C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M,CAAC,MAAM,GAAG,CAAC;YAAE,OAAO,MAAM,CAAC;IACvC,CAAC;IACD,OAAO,EAAE,CAAC;AACZ,CAAC","sourcesContent":["import {\n normalizeCodeAgentTranscript,\n type CodeAgentTranscriptEvent as CoreCodeAgentTranscriptEvent,\n type NormalizedCodeAgentStatusEvent,\n type NormalizedCodeAgentToolEvent,\n type NormalizedCodeAgentTranscriptItem,\n} from \"../../code-agents/transcript-normalizer.js\";\nimport type {\n AgentConversationAttachment,\n AgentConversationArtifact,\n AgentConversationMessage,\n AgentConversationMessagePart,\n AgentConversationNotice,\n AgentConversationToolCall,\n} from \"./types.js\";\n\nexport type CodeAgentConversationTranscriptEventType =\n | \"user\"\n | \"system\"\n | \"artifact\"\n | \"status\"\n | \"note\";\n\n/**\n * Browser/UI transcript event shape used by Code-style hosts. It accepts both\n * the local Code UI field names (`type`, `text`) and the core transcript-store\n * field names (`kind`, `message`) so hosts can pass through either shape.\n */\nexport interface CodeAgentConversationTranscriptEvent {\n id: string;\n runId: string;\n type?: CodeAgentConversationTranscriptEventType;\n kind?: CodeAgentConversationTranscriptEventType;\n title?: string;\n text?: string;\n message?: string;\n createdAt: string;\n artifactPath?: string;\n artifactUrl?: string;\n metadata?: Record<string, unknown>;\n}\n\nexport interface NormalizeCodeAgentTranscriptOptions {\n hideCredentialMessages?: boolean;\n}\n\nexport function normalizeCodeAgentTranscriptForConversation(\n events: readonly CodeAgentConversationTranscriptEvent[],\n options: NormalizeCodeAgentTranscriptOptions = {},\n): AgentConversationMessage[] {\n const normalized = normalizeCodeAgentTranscript(\n events.map(toCoreTranscriptEvent),\n );\n const messages: AgentConversationMessage[] = [];\n const assistantByTurn = new Map<number, AgentConversationMessage>();\n\n const assistantForItem = (item: NormalizedCodeAgentTranscriptItem) => {\n const existing = assistantByTurn.get(item.turnIndex);\n if (existing) return existing;\n const message: AgentConversationMessage = {\n id: `assistant-${item.id}`,\n role: \"assistant\",\n createdAt: item.createdAt,\n text: \"\",\n parts: [],\n tools: [],\n notices: [],\n artifacts: [],\n };\n assistantByTurn.set(item.turnIndex, message);\n messages.push(message);\n return message;\n };\n\n for (const item of normalized.items) {\n if (item.type === \"user\") {\n const attachments = extractAttachments(item.events);\n messages.push({\n id: item.id,\n role: \"user\",\n text: item.text,\n createdAt: item.createdAt,\n pending: item.events.some((event) => event.metadata?.pending === true),\n ...(attachments.length > 0 ? { attachments } : {}),\n });\n continue;\n }\n\n const assistant = assistantForItem(item);\n if (item.type === \"assistant\") {\n appendPart(assistant, {\n id: item.id,\n type: \"text\",\n text: item.text,\n });\n assistant.text = `${assistant.text ?? \"\"}${item.text}`;\n } else if (item.type === \"tool\") {\n const tool = toConversationTool(item);\n appendPart(assistant, {\n id: item.id,\n type: \"tool\",\n tool,\n });\n assistant.tools = [...(assistant.tools ?? []), tool];\n } else if (item.type === \"status\") {\n const artifact = toConversationArtifact(item);\n if (artifact) {\n appendPart(assistant, {\n id: item.id,\n type: \"artifact\",\n artifact,\n });\n assistant.artifacts = [...(assistant.artifacts ?? []), artifact];\n } else {\n const notice = toConversationNotice(item, options);\n if (notice) {\n appendPart(assistant, {\n id: item.id,\n type: \"notice\",\n notice,\n });\n assistant.notices = [...(assistant.notices ?? []), notice];\n }\n }\n }\n }\n\n return messages.filter(\n (message) =>\n message.text?.trim() ||\n message.parts?.length ||\n message.tools?.length ||\n message.notices?.length ||\n message.artifacts?.length,\n );\n}\n\nfunction appendPart(\n message: AgentConversationMessage,\n part: AgentConversationMessagePart,\n): void {\n message.parts = [...(message.parts ?? []), part];\n}\n\nfunction toCoreTranscriptEvent(\n event: CodeAgentConversationTranscriptEvent,\n): CoreCodeAgentTranscriptEvent {\n return {\n schemaVersion: 1,\n id: event.id,\n runId: event.runId,\n kind: (event.kind ??\n event.type ??\n \"status\") as CoreCodeAgentTranscriptEvent[\"kind\"],\n message: event.message ?? event.text ?? \"\",\n createdAt: event.createdAt,\n metadata: {\n ...(event.metadata ?? {}),\n ...(event.title ? { title: event.title } : {}),\n ...(event.artifactPath ? { artifactPath: event.artifactPath } : {}),\n ...(event.artifactUrl ? { artifactUrl: event.artifactUrl } : {}),\n },\n };\n}\n\nfunction toConversationTool(\n item: NormalizedCodeAgentToolEvent,\n): AgentConversationToolCall {\n return {\n id: item.id,\n name: item.tool ?? \"tool\",\n state:\n item.state === \"completed\"\n ? \"completed\"\n : item.state === \"activity\"\n ? \"activity\"\n : \"running\",\n input: preview(item.input),\n result: preview(item.result),\n summary:\n item.state === \"completed\"\n ? \"finished\"\n : item.state === \"activity\"\n ? \"working\"\n : \"started\",\n };\n}\n\nfunction toConversationNotice(\n item: NormalizedCodeAgentStatusEvent,\n options: NormalizeCodeAgentTranscriptOptions,\n): AgentConversationNotice | null {\n if (options.hideCredentialMessages && isCredentialText(item.text))\n return null;\n if (item.level === \"info\" && item.statusKind !== \"note\") return null;\n return {\n id: item.id,\n tone:\n item.level === \"error\"\n ? \"error\"\n : item.level === \"warning\" || item.level === \"approval\"\n ? \"warning\"\n : \"info\",\n title:\n item.level === \"approval\"\n ? \"Approval pending\"\n : item.statusKind === \"note\"\n ? \"Note\"\n : undefined,\n text: item.text,\n };\n}\n\nfunction toConversationArtifact(\n item: NormalizedCodeAgentStatusEvent,\n): AgentConversationArtifact | null {\n if (item.statusKind !== \"artifact\") return null;\n const event = item.events[0];\n const artifactPath =\n stringMetadata(event?.metadata, \"artifactPath\") ??\n stringMetadata(event?.metadata, \"path\");\n const artifactUrl = stringMetadata(event?.metadata, \"artifactUrl\");\n return {\n id: item.id,\n label: item.text || \"Artifact\",\n path: artifactPath,\n url: artifactUrl,\n };\n}\n\nfunction preview(value: unknown): string | undefined {\n if (value === undefined || value === null) return undefined;\n const text =\n typeof value === \"string\" ? value : (JSON.stringify(value, null, 2) ?? \"\");\n const trimmed = text.trim();\n if (!trimmed) return undefined;\n return trimmed.length > 1800 ? `${trimmed.slice(0, 1800)}\\n...` : trimmed;\n}\n\nfunction stringMetadata(\n metadata: Record<string, unknown> | undefined,\n key: string,\n): string | undefined {\n const value = metadata?.[key];\n return typeof value === \"string\" && value.trim() ? value.trim() : undefined;\n}\n\nfunction isCredentialText(value: string): boolean {\n return /No LLM provider key was found|Missing credentials/i.test(value);\n}\n\nfunction extractAttachments(\n events: CoreCodeAgentTranscriptEvent[],\n): AgentConversationAttachment[] {\n for (const event of events) {\n const raw = event.metadata?.attachments;\n if (!Array.isArray(raw) || raw.length === 0) continue;\n const result: AgentConversationAttachment[] = [];\n for (const item of raw) {\n if (!item || typeof item !== \"object\") continue;\n const record = item as Record<string, unknown>;\n const name = typeof record.name === \"string\" ? record.name : undefined;\n if (!name) continue;\n const attachment: AgentConversationAttachment = { name };\n if (typeof record.type === \"string\") attachment.type = record.type;\n if (typeof record.size === \"number\") attachment.size = record.size;\n if (typeof record.dataUrl === \"string\")\n attachment.dataUrl = record.dataUrl;\n result.push(attachment);\n }\n if (result.length > 0) return result;\n }\n return [];\n}\n"]}
|
|
1
|
+
{"version":3,"file":"code-agent-transcript.js","sourceRoot":"","sources":["../../../src/client/conversation/code-agent-transcript.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,GAK7B,MAAM,4CAA4C,CAAC;AAwCpD,MAAM,UAAU,2CAA2C,CACzD,MAAuD,EACvD,UAA+C,EAAE;IAEjD,MAAM,UAAU,GAAG,4BAA4B,CAC7C,MAAM,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAClC,CAAC;IACF,MAAM,QAAQ,GAA+B,EAAE,CAAC;IAChD,MAAM,eAAe,GAAG,IAAI,GAAG,EAAoC,CAAC;IAEpE,MAAM,gBAAgB,GAAG,CAAC,IAAuC,EAAE,EAAE;QACnE,MAAM,QAAQ,GAAG,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACrD,IAAI,QAAQ;YAAE,OAAO,QAAQ,CAAC;QAC9B,MAAM,OAAO,GAA6B;YACxC,EAAE,EAAE,aAAa,IAAI,CAAC,EAAE,EAAE;YAC1B,IAAI,EAAE,WAAW;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AAC,IAAI,CAAC;YACnE,IAAI,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ;gBAAE,UAAU,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;YACnE,IAAI,OAAO,MAAM,CAAC,OAAO,KAAK,QAAQ;gBACpC,UAAU,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;YACtC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAC1B,CAAC;QACD,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC;YAAE,OAAO,MAAM,CAAC;IACvC,CAAC;IACD,OAAO,EAAE,CAAC;AACZ,CAAC","sourcesContent":["import {\n normalizeCodeAgentTranscript,\n type CodeAgentTranscriptEvent as CoreCodeAgentTranscriptEvent,\n type NormalizedCodeAgentStatusEvent,\n type NormalizedCodeAgentToolEvent,\n type NormalizedCodeAgentTranscriptItem,\n} from \"../../code-agents/transcript-normalizer.js\";\nimport type {\n AgentConversationAttachment,\n AgentConversationArtifact,\n AgentConversationMessage,\n AgentConversationMessagePart,\n AgentConversationNotice,\n AgentConversationToolCall,\n} from \"./types.js\";\n\nexport type CodeAgentConversationTranscriptEventType =\n | \"user\"\n | \"system\"\n | \"artifact\"\n | \"status\"\n | \"note\";\n\n/**\n * Browser/UI transcript event shape used by Code-style hosts. It accepts both\n * the local Code UI field names (`type`, `text`) and the core transcript-store\n * field names (`kind`, `message`) so hosts can pass through either shape.\n */\nexport interface CodeAgentConversationTranscriptEvent {\n id: string;\n runId: string;\n type?: CodeAgentConversationTranscriptEventType;\n kind?: CodeAgentConversationTranscriptEventType;\n title?: string;\n text?: string;\n message?: string;\n createdAt: string;\n artifactPath?: string;\n artifactUrl?: string;\n metadata?: Record<string, unknown>;\n}\n\nexport interface NormalizeCodeAgentTranscriptOptions {\n hideCredentialMessages?: boolean;\n}\n\nexport function normalizeCodeAgentTranscriptForConversation(\n events: readonly CodeAgentConversationTranscriptEvent[],\n options: NormalizeCodeAgentTranscriptOptions = {},\n): AgentConversationMessage[] {\n const normalized = normalizeCodeAgentTranscript(\n events.map(toCoreTranscriptEvent),\n );\n const messages: AgentConversationMessage[] = [];\n const assistantByTurn = new Map<number, AgentConversationMessage>();\n\n const assistantForItem = (item: NormalizedCodeAgentTranscriptItem) => {\n const existing = assistantByTurn.get(item.turnIndex);\n if (existing) return existing;\n const message: AgentConversationMessage = {\n id: `assistant-${item.id}`,\n role: \"assistant\",\n createdAt: item.createdAt,\n text: \"\",\n parts: [],\n tools: [],\n notices: [],\n artifacts: [],\n };\n assistantByTurn.set(item.turnIndex, message);\n messages.push(message);\n return message;\n };\n\n for (const item of normalized.items) {\n if (item.type === \"user\") {\n const attachments = extractAttachments(item.events);\n messages.push({\n id: item.id,\n role: \"user\",\n text: item.text,\n createdAt: item.createdAt,\n pending: item.events.some((event) => event.metadata?.pending === true),\n ...(attachments.length > 0 ? { attachments } : {}),\n });\n continue;\n }\n\n const assistant = assistantForItem(item);\n if (item.type === \"assistant\") {\n appendPart(assistant, {\n id: item.id,\n type: \"text\",\n text: item.text,\n });\n assistant.text = `${assistant.text ?? \"\"}${item.text}`;\n } else if (item.type === \"tool\") {\n const tool = toConversationTool(item);\n appendPart(assistant, {\n id: item.id,\n type: \"tool\",\n tool,\n });\n assistant.tools = [...(assistant.tools ?? []), tool];\n } else if (item.type === \"status\") {\n const artifact = toConversationArtifact(item);\n if (artifact) {\n appendPart(assistant, {\n id: item.id,\n type: \"artifact\",\n artifact,\n });\n assistant.artifacts = [...(assistant.artifacts ?? []), artifact];\n } else {\n const notice = toConversationNotice(item, options);\n if (notice) {\n appendPart(assistant, {\n id: item.id,\n type: \"notice\",\n notice,\n });\n assistant.notices = [...(assistant.notices ?? []), notice];\n }\n }\n }\n }\n\n return messages.filter(\n (message) =>\n message.text?.trim() ||\n message.parts?.length ||\n message.tools?.length ||\n message.notices?.length ||\n message.artifacts?.length,\n );\n}\n\nfunction appendPart(\n message: AgentConversationMessage,\n part: AgentConversationMessagePart,\n): void {\n message.parts = [...(message.parts ?? []), part];\n}\n\nfunction toCoreTranscriptEvent(\n event: CodeAgentConversationTranscriptEvent,\n): CoreCodeAgentTranscriptEvent {\n return {\n schemaVersion: 1,\n id: event.id,\n runId: event.runId,\n kind: (event.kind ??\n event.type ??\n \"status\") as CoreCodeAgentTranscriptEvent[\"kind\"],\n message: event.message ?? event.text ?? \"\",\n createdAt: event.createdAt,\n metadata: {\n ...(event.metadata ?? {}),\n ...(event.title ? { title: event.title } : {}),\n ...(event.artifactPath ? { artifactPath: event.artifactPath } : {}),\n ...(event.artifactUrl ? { artifactUrl: event.artifactUrl } : {}),\n },\n };\n}\n\nfunction toConversationTool(\n item: NormalizedCodeAgentToolEvent,\n): AgentConversationToolCall {\n return {\n id: item.id,\n name: item.tool ?? \"tool\",\n state:\n item.state === \"completed\"\n ? \"completed\"\n : item.state === \"activity\"\n ? \"activity\"\n : \"running\",\n input: preview(item.input),\n result: preview(item.result),\n ...(item.mcpApp ? { mcpApp: item.mcpApp } : {}),\n summary:\n item.state === \"completed\"\n ? \"finished\"\n : item.state === \"activity\"\n ? \"working\"\n : \"started\",\n };\n}\n\nfunction toConversationNotice(\n item: NormalizedCodeAgentStatusEvent,\n options: NormalizeCodeAgentTranscriptOptions,\n): AgentConversationNotice | null {\n if (options.hideCredentialMessages && isCredentialText(item.text))\n return null;\n if (item.level === \"info\" && item.statusKind !== \"note\") return null;\n return {\n id: item.id,\n tone:\n item.level === \"error\"\n ? \"error\"\n : item.level === \"warning\" || item.level === \"approval\"\n ? \"warning\"\n : \"info\",\n title:\n item.level === \"approval\"\n ? \"Approval pending\"\n : item.statusKind === \"note\"\n ? \"Note\"\n : undefined,\n text: item.text,\n };\n}\n\nfunction toConversationArtifact(\n item: NormalizedCodeAgentStatusEvent,\n): AgentConversationArtifact | null {\n if (item.statusKind !== \"artifact\") return null;\n const event = item.events[0];\n const artifactPath =\n stringMetadata(event?.metadata, \"artifactPath\") ??\n stringMetadata(event?.metadata, \"path\");\n const artifactUrl = stringMetadata(event?.metadata, \"artifactUrl\");\n return {\n id: item.id,\n label: item.text || \"Artifact\",\n path: artifactPath,\n url: artifactUrl,\n };\n}\n\nfunction preview(value: unknown): string | undefined {\n if (value === undefined || value === null) return undefined;\n const text =\n typeof value === \"string\" ? value : (JSON.stringify(value, null, 2) ?? \"\");\n const trimmed = text.trim();\n if (!trimmed) return undefined;\n return trimmed.length > 1800 ? `${trimmed.slice(0, 1800)}\\n...` : trimmed;\n}\n\nfunction stringMetadata(\n metadata: Record<string, unknown> | undefined,\n key: string,\n): string | undefined {\n const value = metadata?.[key];\n return typeof value === \"string\" && value.trim() ? value.trim() : undefined;\n}\n\nfunction isCredentialText(value: string): boolean {\n return /No LLM provider key was found|Missing credentials/i.test(value);\n}\n\nfunction extractAttachments(\n events: CoreCodeAgentTranscriptEvent[],\n): AgentConversationAttachment[] {\n for (const event of events) {\n const raw = event.metadata?.attachments;\n if (!Array.isArray(raw) || raw.length === 0) continue;\n const result: AgentConversationAttachment[] = [];\n for (const item of raw) {\n if (!item || typeof item !== \"object\") continue;\n const record = item as Record<string, unknown>;\n const name = typeof record.name === \"string\" ? record.name : undefined;\n if (!name) continue;\n const attachment: AgentConversationAttachment = { name };\n if (typeof record.type === \"string\") attachment.type = record.type;\n if (typeof record.size === \"number\") attachment.size = record.size;\n if (typeof record.dataUrl === \"string\")\n attachment.dataUrl = record.dataUrl;\n result.push(attachment);\n }\n if (result.length > 0) return result;\n }\n return [];\n}\n"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
|
+
import type { AgentMcpAppPayload } from "../../mcp-client/app-result.js";
|
|
2
3
|
export interface AgentConversationAttachment {
|
|
3
4
|
name: string;
|
|
4
5
|
type?: string;
|
|
@@ -14,6 +15,7 @@ export interface AgentConversationToolCall {
|
|
|
14
15
|
state: AgentConversationToolState;
|
|
15
16
|
input?: string;
|
|
16
17
|
result?: string;
|
|
18
|
+
mcpApp?: AgentMcpAppPayload;
|
|
17
19
|
summary?: string;
|
|
18
20
|
}
|
|
19
21
|
export type AgentConversationNoticeTone = "info" | "warning" | "error";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/client/conversation/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/client/conversation/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEzE,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gFAAgF;IAChF,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,MAAM,4BAA4B,GAAG,MAAM,GAAG,WAAW,GAAG,QAAQ,CAAC;AAE3E,MAAM,MAAM,0BAA0B,GAClC,SAAS,GACT,WAAW,GACX,SAAS,GACT,UAAU,CAAC;AAEf,MAAM,WAAW,yBAAyB;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,0BAA0B,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,MAAM,2BAA2B,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC;AAEvE,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,2BAA2B,CAAC;IAClC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,SAAS,CAAC;CACpB;AAED,MAAM,WAAW,yBAAyB;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,MAAM,4BAA4B,GACpC;IACE,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,GACD;IACE,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,yBAAyB,CAAC;CACjC,GACD;IACE,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,uBAAuB,CAAC;CACjC,GACD;IACE,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE,yBAAyB,CAAC;CACrC,CAAC;AAEN,MAAM,WAAW,wBAAwB;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,4BAA4B,CAAC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,4BAA4B,EAAE,CAAC;IACvC,KAAK,CAAC,EAAE,yBAAyB,EAAE,CAAC;IACpC,OAAO,CAAC,EAAE,uBAAuB,EAAE,CAAC;IACpC,SAAS,CAAC,EAAE,yBAAyB,EAAE,CAAC;IACxC,WAAW,CAAC,EAAE,2BAA2B,EAAE,CAAC;CAC7C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/client/conversation/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode } from \"react\";\n\nexport interface AgentConversationAttachment {\n name: string;\n type?: string;\n size?: number;\n /** Base64 data URL for image attachments (e.g. \"data:image/png;base64,...\"). */\n dataUrl?: string;\n}\n\nexport type AgentConversationMessageRole = \"user\" | \"assistant\" | \"system\";\n\nexport type AgentConversationToolState =\n | \"running\"\n | \"completed\"\n | \"errored\"\n | \"activity\";\n\nexport interface AgentConversationToolCall {\n id: string;\n name: string;\n state: AgentConversationToolState;\n input?: string;\n result?: string;\n summary?: string;\n}\n\nexport type AgentConversationNoticeTone = \"info\" | \"warning\" | \"error\";\n\nexport interface AgentConversationNotice {\n id: string;\n tone: AgentConversationNoticeTone;\n title?: string;\n text: string;\n action?: ReactNode;\n}\n\nexport interface AgentConversationArtifact {\n id: string;\n label: string;\n path?: string;\n url?: string;\n}\n\nexport type AgentConversationMessagePart =\n | {\n id: string;\n type: \"text\";\n text: string;\n }\n | {\n id: string;\n type: \"tool\";\n tool: AgentConversationToolCall;\n }\n | {\n id: string;\n type: \"notice\";\n notice: AgentConversationNotice;\n }\n | {\n id: string;\n type: \"artifact\";\n artifact: AgentConversationArtifact;\n };\n\nexport interface AgentConversationMessage {\n id: string;\n role: AgentConversationMessageRole;\n text?: string;\n createdAt?: string;\n pending?: boolean;\n parts?: AgentConversationMessagePart[];\n tools?: AgentConversationToolCall[];\n notices?: AgentConversationNotice[];\n artifacts?: AgentConversationArtifact[];\n attachments?: AgentConversationAttachment[];\n}\n"]}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/client/conversation/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ReactNode } from \"react\";\nimport type { AgentMcpAppPayload } from \"../../mcp-client/app-result.js\";\n\nexport interface AgentConversationAttachment {\n name: string;\n type?: string;\n size?: number;\n /** Base64 data URL for image attachments (e.g. \"data:image/png;base64,...\"). */\n dataUrl?: string;\n}\n\nexport type AgentConversationMessageRole = \"user\" | \"assistant\" | \"system\";\n\nexport type AgentConversationToolState =\n | \"running\"\n | \"completed\"\n | \"errored\"\n | \"activity\";\n\nexport interface AgentConversationToolCall {\n id: string;\n name: string;\n state: AgentConversationToolState;\n input?: string;\n result?: string;\n mcpApp?: AgentMcpAppPayload;\n summary?: string;\n}\n\nexport type AgentConversationNoticeTone = \"info\" | \"warning\" | \"error\";\n\nexport interface AgentConversationNotice {\n id: string;\n tone: AgentConversationNoticeTone;\n title?: string;\n text: string;\n action?: ReactNode;\n}\n\nexport interface AgentConversationArtifact {\n id: string;\n label: string;\n path?: string;\n url?: string;\n}\n\nexport type AgentConversationMessagePart =\n | {\n id: string;\n type: \"text\";\n text: string;\n }\n | {\n id: string;\n type: \"tool\";\n tool: AgentConversationToolCall;\n }\n | {\n id: string;\n type: \"notice\";\n notice: AgentConversationNotice;\n }\n | {\n id: string;\n type: \"artifact\";\n artifact: AgentConversationArtifact;\n };\n\nexport interface AgentConversationMessage {\n id: string;\n role: AgentConversationMessageRole;\n text?: string;\n createdAt?: string;\n pending?: boolean;\n parts?: AgentConversationMessagePart[];\n tools?: AgentConversationToolCall[];\n notices?: AgentConversationNotice[];\n artifacts?: AgentConversationArtifact[];\n attachments?: AgentConversationAttachment[];\n}\n"]}
|
package/dist/client/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export { useSendToAgentChat } from "./use-send-to-agent-chat.js";
|
|
|
9
9
|
export { useChatModels, type UseChatModelsResult, type EngineModelGroup, } from "./use-chat-models.js";
|
|
10
10
|
export { CodeRequiredDialog, type CodeRequiredDialogProps, } from "./components/CodeRequiredDialog.js";
|
|
11
11
|
export { AgentConversation, AgentConversationMessageView, normalizeCodeAgentTranscriptForConversation, useNearBottomAutoscroll, type CodeAgentConversationTranscriptEvent, type CodeAgentConversationTranscriptEventType, type NormalizeCodeAgentTranscriptOptions, type AgentConversationArtifact, type AgentConversationAttachment, type AgentConversationMessage, type AgentConversationMessagePart, type AgentConversationMessageRole, type AgentConversationNotice, type AgentConversationNoticeTone, type AgentConversationToolCall, type AgentConversationToolState, } from "./conversation/index.js";
|
|
12
|
+
export { McpAppRenderer } from "./mcp-apps/McpAppRenderer.js";
|
|
12
13
|
export { CodeAgentIndicator, type CodeAgentIndicatorProps, } from "./components/CodeAgentIndicator.js";
|
|
13
14
|
export { useDbSync, useFileWatcher, useScreenRefreshKey, } from "./use-db-sync.js";
|
|
14
15
|
export { useChangeVersion, useChangeVersions, getChangeVersion, bumpChangeVersion, } from "./use-change-version.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,eAAe,EACf,aAAa,EACb,KAAK,gBAAgB,GACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EACL,eAAe,EACf,UAAU,EACV,WAAW,EACX,OAAO,GACR,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,kCAAkC,EAClC,0BAA0B,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,0BAA0B,EAC/B,KAAK,yBAAyB,EAC9B,KAAK,4BAA4B,EACjC,KAAK,iCAAiC,GACvC,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,sCAAsC,EACtC,KAAK,6CAA6C,EAClD,KAAK,8BAA8B,GACpC,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,gCAAgC,EAChC,yBAAyB,EACzB,oBAAoB,EACpB,8BAA8B,EAC9B,KAAK,qBAAqB,EAC1B,KAAK,6BAA6B,GACnC,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EACL,aAAa,EACb,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,GACtB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,kBAAkB,EAClB,KAAK,uBAAuB,GAC7B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAC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SAAS,EACd,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,cAAc,GACpB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,KAAK,cAAc,GACpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EACL,WAAW,EACX,WAAW,EACX,eAAe,EACf,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,GAC1B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,YAAY,EACZ,cAAc,EACd,2BAA2B,EAC3B,KAAK,oBAAoB,GAC1B,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,qBAAqB,GACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,sBAAsB,EACtB,cAAc,GACf,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,WAAW,EACX,KAAK,gBAAgB,GACtB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,iBAAiB,EACjB,KAAK,sBAAsB,GAC5B,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,KAAK,0BAA0B,EAC/B,KAAK,yBAAyB,EAC9B,KAAK,4BAA4B,EACjC,KAAK,2BAA2B,GACjC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,eAAe,EACf,aAAa,EACb,KAAK,gBAAgB,GACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,sB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B,GAC1B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,YAAY,EACZ,cAAc,EACd,2BAA2B,EAC3B,KAAK,oBAAoB,GAC1B,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,qBAAqB,GACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,sBAAsB,EACtB,cAAc,GACf,MAAM,0BAA0B,CAAC;AAElC,OAAO,EACL,WAAW,EACX,KAAK,gBAAgB,GACtB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,iBAAiB,EACjB,KAAK,sBAAsB,GAC5B,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,KAAK,0BAA0B,EAC/B,KAAK,yBAAyB,EAC9B,KAAK,4BAA4B,EACjC,KAAK,2BAA2B,GACjC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC"}
|
package/dist/client/index.js
CHANGED
|
@@ -11,6 +11,7 @@ export { useSendToAgentChat } from "./use-send-to-agent-chat.js";
|
|
|
11
11
|
export { useChatModels, } from "./use-chat-models.js";
|
|
12
12
|
export { CodeRequiredDialog, } from "./components/CodeRequiredDialog.js";
|
|
13
13
|
export { AgentConversation, AgentConversationMessageView, normalizeCodeAgentTranscriptForConversation, useNearBottomAutoscroll, } from "./conversation/index.js";
|
|
14
|
+
export { McpAppRenderer } from "./mcp-apps/McpAppRenderer.js";
|
|
14
15
|
export { CodeAgentIndicator, } from "./components/CodeAgentIndicator.js";
|
|
15
16
|
export { useDbSync, useFileWatcher, useScreenRefreshKey, } from "./use-db-sync.js";
|
|
16
17
|
export { useChangeVersion, useChangeVersions, getChangeVersion, bumpChangeVersion, } from "./use-change-version.js";
|
package/dist/client/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
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AACzB,OAAO,EAAE,YAAY,EAA4B,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EACL,WAAW,EACX,WAAW,EACX,eAAe,GAIhB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,YAAY,EACZ,cAAc,EACd,2BAA2B,GAE5B,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,EACL,YAAY,EACZ,YAAY,EACZ,qBAAqB,GACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,sBAAsB,EACtB,cAAc,GACf,MAAM,0BAA0B,CAAC;AAClC,yBAAyB;AACzB,OAAO,EACL,WAAW,GAEZ,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,iBAAiB,GAElB,MAAM,mCAAmC,CAAC;AAC3C,sCAAsC;AACtC,OAAO,EACL,mBAAmB,EACnB,qBAAqB,GAKtB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC","sourcesContent":["import { installRouteChunkRecovery } from \"./route-chunk-recovery.js\";\n\ninstallRouteChunkRecovery();\n\nexport {\n sendToAgentChat,\n generateTabId,\n type AgentChatMessage,\n} from \"./agent-chat.js\";\nexport { useAgentChatGenerating } from \"./use-agent-chat.js\";\nexport { useDevMode } from \"./use-dev-mode.js\";\nexport {\n agentNativePath,\n appApiPath,\n appBasePath,\n appPath,\n} from \"./api-path.js\";\nexport {\n codeAgentTranscriptEventsToContent,\n createCodeAgentChatAdapter,\n type CodeAgentChatController,\n type CodeAgentChatControlResult,\n type CodeAgentChatFollowUpMode,\n type CodeAgentChatTranscriptEvent,\n type CreateCodeAgentChatAdapterOptions,\n} from \"./code-agent-chat-adapter.js\";\nexport {\n buildRepositoryFromCodeAgentTranscript,\n type BuildRepositoryFromCodeAgentTranscriptOptions,\n type CodeAgentThreadTranscriptEvent,\n} from \"../agent/thread-data-builder.js\";\nexport {\n compareCodeAgentTranscriptEvents,\n getCodeAgentTranscriptSeq,\n isCodeAgentRunActive,\n mergeCodeAgentTranscriptEvents,\n type CodeAgentRunStateLike,\n type CodeAgentTranscriptOrderEvent,\n} from \"../code-agents/transcript-order.js\";\nexport { useSendToAgentChat } from \"./use-send-to-agent-chat.js\";\nexport {\n useChatModels,\n type UseChatModelsResult,\n type EngineModelGroup,\n} from \"./use-chat-models.js\";\nexport {\n CodeRequiredDialog,\n type CodeRequiredDialogProps,\n} from \"./components/CodeRequiredDialog.js\";\nexport {\n AgentConversation,\n AgentConversationMessageView,\n normalizeCodeAgentTranscriptForConversation,\n useNearBottomAutoscroll,\n type CodeAgentConversationTranscriptEvent,\n type CodeAgentConversationTranscriptEventType,\n type NormalizeCodeAgentTranscriptOptions,\n type AgentConversationArtifact,\n type AgentConversationAttachment,\n type AgentConversationMessage,\n type AgentConversationMessagePart,\n type AgentConversationMessageRole,\n type AgentConversationNotice,\n type AgentConversationNoticeTone,\n type AgentConversationToolCall,\n type AgentConversationToolState,\n} from \"./conversation/index.js\";\nexport {\n CodeAgentIndicator,\n type CodeAgentIndicatorProps,\n} from \"./components/CodeAgentIndicator.js\";\nexport {\n useDbSync,\n useFileWatcher,\n useScreenRefreshKey,\n} from \"./use-db-sync.js\";\nexport {\n useChangeVersion,\n useChangeVersions,\n getChangeVersion,\n bumpChangeVersion,\n} from \"./use-change-version.js\";\nexport {\n buildDynamicAgentSuggestions,\n dedupeSuggestions,\n mergeAgentSuggestions,\n normalizeAgentDynamicSuggestionsConfig,\n useAgentDynamicSuggestions,\n type AgentDynamicSuggestionContext,\n type AgentDynamicSuggestionsConfig,\n type AgentDynamicSuggestionsOption,\n} from \"./dynamic-suggestions.js\";\nexport { cn } from \"./utils.js\";\nexport { ApiKeySettings } from \"./components/ApiKeySettings.js\";\nexport { useSession, type AuthSession } from \"./use-session.js\";\nexport {\n sendToFrame,\n onFrameMessage,\n requestUserInfo,\n getFrameOrigin,\n getCallbackOrigin,\n oauthRedirectUri,\n isInFrame,\n enterStyleEditing,\n enterTextEditing,\n exitSelectionMode,\n type UserInfo,\n} from \"./frame.js\";\nexport {\n getBuilderParentOrigin,\n isInBuilderFrame,\n sendToBuilderChat,\n type BuilderChatMessage,\n} from \"./builder-frame.js\";\nexport {\n AgentNative,\n useAgentNativeScreenContext,\n type AgentNativeCommandCallback,\n type AgentNativeCommandCallbackInfo,\n type AgentNativeProps,\n} from \"./AgentNative.js\";\nexport {\n AgentNativeEmbedded,\n useAgentNativeEmbeddedBrowserSession,\n type AgentNativeEmbeddedBrowserSessionOptions,\n type AgentNativeEmbeddedCommandCallback,\n type AgentNativeEmbeddedCommandCallbackInfo,\n type AgentNativeEmbeddedProps,\n type UseAgentNativeEmbeddedBrowserSessionOptions,\n} from \"./AgentNativeEmbedded.js\";\nexport {\n defineClientAction,\n type AgentNativeClientActionDefinition,\n type AgentNativeClientActionRunner,\n} from \"./client-action.js\";\nexport {\n AgentNativeFrame,\n type AgentNativeFrameProps,\n} from \"./AgentNativeFrame.js\";\nexport {\n AgentNativeExtensionFrame,\n AgentNativeExtensionSlot,\n type AgentNativeExtensionFrameProps,\n type AgentNativeExtensionPermissionList,\n type AgentNativeExtensionSlotProps,\n type AgentNativeExtensionStorageScopeList,\n} from \"./extensions/AgentNativeExtensionFrame.js\";\nexport {\n AGENT_NATIVE_EXTENSION_MESSAGE_TYPES,\n buildAgentNativeExtensionHtml,\n createHttpAgentNativeExtensionStorage,\n createLocalStorageAgentNativeExtensionStorage,\n getAgentNativeExtensionManifest,\n isAgentNativeExtensionAllowedInSlot,\n normalizeAgentNativeExtensionSandbox,\n type AgentNativeExtensionDefinition,\n type AgentNativeExtensionManifest,\n type AgentNativeExtensionMessageType,\n type AgentNativeExtensionStorage,\n type AgentNativeExtensionStorageContext,\n type AgentNativeExtensionStorageOptions,\n type AgentNativeExtensionStorageRow,\n type AgentNativeExtensionStorageScope,\n type BuildAgentNativeExtensionHtmlOptions,\n type CreateHttpAgentNativeExtensionStorageOptions,\n} from \"./extensions/portable-extension.js\";\nexport {\n AGENT_NATIVE_HOST_BRIDGE_VERSION,\n AGENT_NATIVE_HOST_MESSAGE_TYPES,\n announceAgentNativeFrameReady,\n createAgentNativeHostBridge,\n defaultAgentNativeHostCommands,\n onAgentNativeHostInit,\n readAgentNativeScreenContext,\n requestAgentNativeHostActions,\n requestAgentNativeHostContext,\n runAgentNativeHostAction,\n sendAgentNativeHostCommand,\n type AgentNativeActionAvailability,\n type AgentNativeActionManifestEntry,\n type AgentNativeClientAction,\n type AgentNativeClientActionApprovalConfig,\n type AgentNativeClientActionGetter,\n type AgentNativeClientActionRuntime,\n type AgentNativeClientActions,\n type AgentNativeHostAuth,\n type AgentNativeHostAuthPayload,\n type AgentNativeHostBridge,\n type AgentNativeHostBridgeEvent,\n type AgentNativeHostBridgeOptions,\n type AgentNativeHostCapabilities,\n type AgentNativeHostCommandHandler,\n type AgentNativeHostCommandHandlers,\n type AgentNativeHostCommandRequest,\n type AgentNativeHostContext,\n type AgentNativeHostContextGetter,\n type AgentNativeHostInit,\n type AgentNativeHostMessageType,\n type AgentNativeHostRequestOptions,\n type AgentNativeHostResourceContext,\n type AgentNativeHostRouteContext,\n type AgentNativeHostSelectionContext,\n type AgentNativeHostSession,\n type AgentNativeJsonSchema,\n type AgentNativeScreenSnapshot,\n type AgentNativeScreenSnapshotOptions,\n type BuiltInAgentNativeHostCommand,\n} from \"./host-bridge.js\";\nexport {\n AGENT_NATIVE_HOST_TOOL_NAMES,\n createAgentNativeHostTools,\n type AgentNativeHostToolDefinition,\n type AgentNativeHostToolName,\n type AgentNativeHostToolParameters,\n type AgentNativeHostToolSet,\n type CreateAgentNativeHostToolsOptions,\n type RunAgentNativeHostActionToolInput,\n type SendAgentNativeHostCommandToolInput,\n} from \"./host-tools.js\";\nexport {\n createAgentNativeBrowserSessionBridge,\n startAgentNativeBrowserSessionBridge,\n type AgentNativeBrowserSessionBridge,\n type AgentNativeBrowserSessionBridgeOptions,\n} from \"./browser-session-bridge.js\";\nexport type {\n AgentNativeBrowserSession,\n AgentNativeBrowserSessionAction,\n AgentNativeBrowserSessionRecord,\n AgentNativeBrowserSessionRequest,\n AgentNativeBrowserSessionRequestStatus,\n AgentNativeBrowserSessionRequestType,\n CreateAgentNativeBrowserSessionRequestInput,\n RegisterAgentNativeBrowserSessionInput,\n} from \"../browser-sessions/types.js\";\nexport {\n NewWorkspaceAppFlow,\n type NewWorkspaceAppFlowProps,\n type VaultSecretOption,\n} from \"./NewWorkspaceAppFlow.js\";\nexport {\n AssistantChat,\n clearChatStorage,\n type AssistantChatProps,\n type AssistantChatHandle,\n} from \"./AssistantChat.js\";\nexport {\n MultiTabAssistantChat,\n type MultiTabAssistantChatProps,\n type MultiTabAssistantChatHeaderProps,\n} from \"./MultiTabAssistantChat.js\";\nexport { RunStuckBanner, type RunStuckBannerProps } from \"./RunStuckBanner.js\";\nexport {\n useRunStuckDetection,\n useAbortRun,\n type RunStuckState,\n type UseRunStuckDetectionOptions,\n} from \"./use-run-stuck-detection.js\";\nexport { createAgentChatAdapter } from \"./agent-chat-adapter.js\";\nexport {\n AgentComposerFrame,\n type AgentComposerFrameProps,\n PromptComposer,\n AGENT_PROMPT_MAX_INLINE_IMAGE_BYTES,\n AGENT_PROMPT_MAX_INLINE_TEXT_CHARS,\n escapePromptAttachmentAttribute,\n formatPromptWithAttachments,\n isInlineableAgentPromptFile,\n readAgentPromptAttachment,\n type PromptComposerProps,\n type PromptComposerFile,\n type PromptComposerSubmitOptions,\n type AgentPromptAttachment,\n type ReadAgentPromptAttachmentOptions,\n type AgentComposerLayoutVariant,\n type SlashCommand,\n type SkillResult,\n} from \"./composer/index.js\";\nexport type { TiptapComposerHandle } from \"./composer/TiptapComposer.js\";\nexport {\n GuidedQuestionFlow,\n useGuidedQuestionFlow,\n formatGuidedAnswerValue,\n formatGuidedAnswersForAgent,\n getOtherGuidedAnswerText,\n hasGuidedAnswer,\n isOtherGuidedAnswer,\n makeOtherGuidedAnswer,\n normalizeGuidedAnswers,\n type GuidedQuestion,\n type GuidedQuestionAnswers,\n type GuidedQuestionFlowProps,\n type GuidedQuestionOption,\n type GuidedQuestionPayload,\n type GuidedQuestionType,\n type UseGuidedQuestionFlowOptions,\n} from \"./guided-questions.js\";\nexport {\n useChatThreads,\n type ChatThreadScope,\n type ChatThreadSummary,\n type ChatThreadData,\n} from \"./use-chat-threads.js\";\nexport {\n AgentChatSurface,\n AgentPanel,\n AgentSidebar,\n AgentToggleButton,\n focusAgentChat,\n type AgentChatSurfaceMode,\n type AgentChatSurfaceProps,\n type AgentPanelProps,\n type AgentSidebarProps,\n} from \"./AgentPanel.js\";\nexport {\n SIDEBAR_STATE_CHANGE_EVENT,\n type AgentSidebarStateChangeDetail,\n type AgentSidebarStateMode,\n type AgentSidebarStateSource,\n} from \"./agent-sidebar-state.js\";\nexport { AgentNativeIcon } from \"./components/icons/AgentNativeIcon.js\";\nexport { SettingsPanel, type SettingsPanelProps } from \"./settings/index.js\";\nexport { useBuilderStatus } from \"./settings/useBuilderStatus.js\";\nexport {\n openBuilderConnectPopup,\n useBuilderConnectFlow,\n type BuilderConnectFlow,\n type BuilderConnectFlowOptions,\n type OpenBuilderConnectPopupOptions,\n} from \"./settings/useBuilderStatus.js\";\n// Deprecated — use AgentSidebar + AgentToggleButton instead\nexport {\n ProductionAgentPanel,\n type ProductionAgentPanelProps,\n} from \"./ProductionAgentPanel.js\";\nexport {\n useProductionAgent,\n type ProductionAgentMessage,\n type UseProductionAgentOptions,\n type UseProductionAgentResult,\n} from \"./useProductionAgent.js\";\nexport { Turnstile, type TurnstileProps } from \"./Turnstile.js\";\nexport {\n OpenSourceBadge,\n PoweredByBadge,\n type OpenSourceBadgeProps,\n type PoweredByBadgeProps,\n} from \"./PoweredByBadge.js\";\nexport { FeedbackButton, type FeedbackButtonProps } from \"./FeedbackButton.js\";\nexport { ErrorBoundary } from \"./ErrorBoundary.js\";\nexport { installRouteChunkRecovery } from \"./route-chunk-recovery.js\";\nexport { ClientOnly } from \"./ClientOnly.js\";\nexport { DefaultSpinner } from \"./DefaultSpinner.js\";\nexport {\n getThemeInitScript,\n themeInitScript,\n type ThemePreference,\n} from \"./theme.js\";\nexport {\n APPEARANCE_PRESETS,\n applyAppearance,\n getStoredAppearance,\n useAppearance,\n useAppearanceSync,\n type AppearancePresetId,\n} from \"./appearance.js\";\nexport {\n AppearancePicker,\n type AppearancePickerProps,\n} from \"./AppearancePicker.js\";\nexport { AgentTerminal, type AgentTerminalProps } from \"./terminal/index.js\";\nexport {\n trackEvent,\n trackSessionStatus,\n configureTracking,\n setSentryUser,\n captureError,\n captureClientException,\n type ClientCaptureContext,\n} from \"./analytics.js\";\nexport {\n useCollaborativeDoc,\n emailToColor,\n emailToName,\n type UseCollaborativeDocOptions,\n type UseCollaborativeDocResult,\n type CollabUser,\n} from \"../collab/client.js\";\nexport {\n ResourcesPanel,\n ResourceTree,\n ResourceEditor,\n useResources,\n useResourceTree,\n useResource,\n useCreateResource,\n useUpdateResource,\n useDeleteResource,\n useUploadResource,\n type Resource,\n type ResourceMeta,\n type TreeNode,\n type ResourceScope,\n type ResourceTreeProps,\n type ResourceEditorProps,\n} from \"./resources/index.js\";\nexport type {\n AppToFrameMessage,\n FrameToAppMessage,\n FrameMessage,\n CodeCompleteMessage,\n ChatRunningMessage,\n} from \"./frame-protocol.js\";\nexport {\n CommandMenu,\n useCommandMenuShortcut,\n openAgentSidebar,\n submitToAgent,\n type CommandMenuProps,\n type CommandGroupProps,\n type CommandItemProps,\n type CommandShortcutProps,\n} from \"./CommandMenu.js\";\nexport {\n DevOverlay,\n useDevOverlayShortcut,\n registerDevPanel,\n unregisterDevPanel,\n listDevPanels,\n subscribeDevPanels,\n useDevOption,\n clearAllDevOverlayStorage,\n devOptionKey,\n DEV_OVERLAY_STORAGE_PREFIX,\n type DevOverlayProps,\n type DevPanel,\n type DevOption,\n type DevBooleanOption,\n type DevSelectOption,\n type DevStringOption,\n type DevActionOption,\n type DevOptionValue,\n} from \"./dev-overlay/index.js\";\nexport {\n useActionQuery,\n useActionMutation,\n type ActionRegistry,\n} from \"./use-action.js\";\nexport { usePinchZoom, type UsePinchZoomOptions } from \"./use-pinch-zoom.js\";\nexport {\n ShareButton,\n ShareDialog,\n VisibilityBadge,\n type ShareButtonProps,\n type ShareDialogProps,\n type VisibilityBadgeProps,\n} from \"./sharing/index.js\";\nexport {\n postNavigate,\n isInAgentEmbed,\n AGENT_NAVIGATE_MESSAGE_TYPE,\n type AgentNavigateMessage,\n} from \"./embed.js\";\nexport { IframeEmbed, parseEmbedBody } from \"./IframeEmbed.js\";\nexport {\n useAvatarUrl,\n uploadAvatar,\n invalidateAvatarCache,\n} from \"./use-avatar.js\";\nexport {\n ObservabilityDashboard,\n ThumbsFeedback,\n} from \"./observability/index.js\";\n// Presence UI components\nexport {\n PresenceBar,\n type PresenceBarProps,\n} from \"./components/PresenceBar.js\";\nexport {\n AgentPresenceChip,\n type AgentPresenceChipProps,\n} from \"./components/AgentPresenceChip.js\";\n// Structured data collaboration hooks\nexport {\n useCollaborativeMap,\n useCollaborativeArray,\n type UseCollaborativeMapOptions,\n type UseCollaborativeMapResult,\n type UseCollaborativeArrayOptions,\n type UseCollaborativeArrayResult,\n} from \"../collab/client-struct.js\";\nexport { NotificationsBell } from \"./notifications/index.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAEtE,yBAAyB,EAAE,CAAC;AAE5B,OAAO,EACL,eAAe,EACf,aAAa,GAEd,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EACL,eAAe,EACf,UAAU,EACV,WAAW,EACX,OAAO,GACR,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,kCAAkC,EAClC,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B,cAAc,GACf,MAAM,0BAA0B,CAAC;AAClC,yBAAyB;AACzB,OAAO,EACL,WAAW,GAEZ,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,iBAAiB,GAElB,MAAM,mCAAmC,CAAC;AAC3C,sCAAsC;AACtC,OAAO,EACL,mBAAmB,EACnB,qBAAqB,GAKtB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC","sourcesContent":["import { installRouteChunkRecovery } from \"./route-chunk-recovery.js\";\n\ninstallRouteChunkRecovery();\n\nexport {\n sendToAgentChat,\n generateTabId,\n type AgentChatMessage,\n} from \"./agent-chat.js\";\nexport { useAgentChatGenerating } from \"./use-agent-chat.js\";\nexport { useDevMode } from \"./use-dev-mode.js\";\nexport {\n agentNativePath,\n appApiPath,\n appBasePath,\n appPath,\n} from \"./api-path.js\";\nexport {\n codeAgentTranscriptEventsToContent,\n createCodeAgentChatAdapter,\n type CodeAgentChatController,\n type CodeAgentChatControlResult,\n type CodeAgentChatFollowUpMode,\n type CodeAgentChatTranscriptEvent,\n type CreateCodeAgentChatAdapterOptions,\n} from \"./code-agent-chat-adapter.js\";\nexport {\n buildRepositoryFromCodeAgentTranscript,\n type BuildRepositoryFromCodeAgentTranscriptOptions,\n type CodeAgentThreadTranscriptEvent,\n} from \"../agent/thread-data-builder.js\";\nexport {\n compareCodeAgentTranscriptEvents,\n getCodeAgentTranscriptSeq,\n isCodeAgentRunActive,\n mergeCodeAgentTranscriptEvents,\n type CodeAgentRunStateLike,\n type CodeAgentTranscriptOrderEvent,\n} from \"../code-agents/transcript-order.js\";\nexport { useSendToAgentChat } from \"./use-send-to-agent-chat.js\";\nexport {\n useChatModels,\n type UseChatModelsResult,\n type EngineModelGroup,\n} from \"./use-chat-models.js\";\nexport {\n CodeRequiredDialog,\n type CodeRequiredDialogProps,\n} from \"./components/CodeRequiredDialog.js\";\nexport {\n AgentConversation,\n AgentConversationMessageView,\n normalizeCodeAgentTranscriptForConversation,\n useNearBottomAutoscroll,\n type CodeAgentConversationTranscriptEvent,\n type CodeAgentConversationTranscriptEventType,\n type NormalizeCodeAgentTranscriptOptions,\n type AgentConversationArtifact,\n type AgentConversationAttachment,\n type AgentConversationMessage,\n type AgentConversationMessagePart,\n type AgentConversationMessageRole,\n type AgentConversationNotice,\n type AgentConversationNoticeTone,\n type AgentConversationToolCall,\n type AgentConversationToolState,\n} from \"./conversation/index.js\";\nexport { McpAppRenderer } from \"./mcp-apps/McpAppRenderer.js\";\nexport {\n CodeAgentIndicator,\n type CodeAgentIndicatorProps,\n} from \"./components/CodeAgentIndicator.js\";\nexport {\n useDbSync,\n useFileWatcher,\n useScreenRefreshKey,\n} from \"./use-db-sync.js\";\nexport {\n useChangeVersion,\n useChangeVersions,\n getChangeVersion,\n bumpChangeVersion,\n} from \"./use-change-version.js\";\nexport {\n buildDynamicAgentSuggestions,\n dedupeSuggestions,\n mergeAgentSuggestions,\n normalizeAgentDynamicSuggestionsConfig,\n useAgentDynamicSuggestions,\n type AgentDynamicSuggestionContext,\n type AgentDynamicSuggestionsConfig,\n type AgentDynamicSuggestionsOption,\n} from \"./dynamic-suggestions.js\";\nexport { cn } from \"./utils.js\";\nexport { ApiKeySettings } from \"./components/ApiKeySettings.js\";\nexport { useSession, type AuthSession } from \"./use-session.js\";\nexport {\n sendToFrame,\n onFrameMessage,\n requestUserInfo,\n getFrameOrigin,\n getCallbackOrigin,\n oauthRedirectUri,\n isInFrame,\n enterStyleEditing,\n enterTextEditing,\n exitSelectionMode,\n type UserInfo,\n} from \"./frame.js\";\nexport {\n getBuilderParentOrigin,\n isInBuilderFrame,\n sendToBuilderChat,\n type BuilderChatMessage,\n} from \"./builder-frame.js\";\nexport {\n AgentNative,\n useAgentNativeScreenContext,\n type AgentNativeCommandCallback,\n type AgentNativeCommandCallbackInfo,\n type AgentNativeProps,\n} from \"./AgentNative.js\";\nexport {\n AgentNativeEmbedded,\n useAgentNativeEmbeddedBrowserSession,\n type AgentNativeEmbeddedBrowserSessionOptions,\n type AgentNativeEmbeddedCommandCallback,\n type AgentNativeEmbeddedCommandCallbackInfo,\n type AgentNativeEmbeddedProps,\n type UseAgentNativeEmbeddedBrowserSessionOptions,\n} from \"./AgentNativeEmbedded.js\";\nexport {\n defineClientAction,\n type AgentNativeClientActionDefinition,\n type AgentNativeClientActionRunner,\n} from \"./client-action.js\";\nexport {\n AgentNativeFrame,\n type AgentNativeFrameProps,\n} from \"./AgentNativeFrame.js\";\nexport {\n AgentNativeExtensionFrame,\n AgentNativeExtensionSlot,\n type AgentNativeExtensionFrameProps,\n type AgentNativeExtensionPermissionList,\n type AgentNativeExtensionSlotProps,\n type AgentNativeExtensionStorageScopeList,\n} from \"./extensions/AgentNativeExtensionFrame.js\";\nexport {\n AGENT_NATIVE_EXTENSION_MESSAGE_TYPES,\n buildAgentNativeExtensionHtml,\n createHttpAgentNativeExtensionStorage,\n createLocalStorageAgentNativeExtensionStorage,\n getAgentNativeExtensionManifest,\n isAgentNativeExtensionAllowedInSlot,\n normalizeAgentNativeExtensionSandbox,\n type AgentNativeExtensionDefinition,\n type AgentNativeExtensionManifest,\n type AgentNativeExtensionMessageType,\n type AgentNativeExtensionStorage,\n type AgentNativeExtensionStorageContext,\n type AgentNativeExtensionStorageOptions,\n type AgentNativeExtensionStorageRow,\n type AgentNativeExtensionStorageScope,\n type BuildAgentNativeExtensionHtmlOptions,\n type CreateHttpAgentNativeExtensionStorageOptions,\n} from \"./extensions/portable-extension.js\";\nexport {\n AGENT_NATIVE_HOST_BRIDGE_VERSION,\n AGENT_NATIVE_HOST_MESSAGE_TYPES,\n announceAgentNativeFrameReady,\n createAgentNativeHostBridge,\n defaultAgentNativeHostCommands,\n onAgentNativeHostInit,\n readAgentNativeScreenContext,\n requestAgentNativeHostActions,\n requestAgentNativeHostContext,\n runAgentNativeHostAction,\n sendAgentNativeHostCommand,\n type AgentNativeActionAvailability,\n type AgentNativeActionManifestEntry,\n type AgentNativeClientAction,\n type AgentNativeClientActionApprovalConfig,\n type AgentNativeClientActionGetter,\n type AgentNativeClientActionRuntime,\n type AgentNativeClientActions,\n type AgentNativeHostAuth,\n type AgentNativeHostAuthPayload,\n type AgentNativeHostBridge,\n type AgentNativeHostBridgeEvent,\n type AgentNativeHostBridgeOptions,\n type AgentNativeHostCapabilities,\n type AgentNativeHostCommandHandler,\n type AgentNativeHostCommandHandlers,\n type AgentNativeHostCommandRequest,\n type AgentNativeHostContext,\n type AgentNativeHostContextGetter,\n type AgentNativeHostInit,\n type AgentNativeHostMessageType,\n type AgentNativeHostRequestOptions,\n type AgentNativeHostResourceContext,\n type AgentNativeHostRouteContext,\n type AgentNativeHostSelectionContext,\n type AgentNativeHostSession,\n type AgentNativeJsonSchema,\n type AgentNativeScreenSnapshot,\n type AgentNativeScreenSnapshotOptions,\n type BuiltInAgentNativeHostCommand,\n} from \"./host-bridge.js\";\nexport {\n AGENT_NATIVE_HOST_TOOL_NAMES,\n createAgentNativeHostTools,\n type AgentNativeHostToolDefinition,\n type AgentNativeHostToolName,\n type AgentNativeHostToolParameters,\n type AgentNativeHostToolSet,\n type CreateAgentNativeHostToolsOptions,\n type RunAgentNativeHostActionToolInput,\n type SendAgentNativeHostCommandToolInput,\n} from \"./host-tools.js\";\nexport {\n createAgentNativeBrowserSessionBridge,\n startAgentNativeBrowserSessionBridge,\n type AgentNativeBrowserSessionBridge,\n type AgentNativeBrowserSessionBridgeOptions,\n} from \"./browser-session-bridge.js\";\nexport type {\n AgentNativeBrowserSession,\n AgentNativeBrowserSessionAction,\n AgentNativeBrowserSessionRecord,\n AgentNativeBrowserSessionRequest,\n AgentNativeBrowserSessionRequestStatus,\n AgentNativeBrowserSessionRequestType,\n CreateAgentNativeBrowserSessionRequestInput,\n RegisterAgentNativeBrowserSessionInput,\n} from \"../browser-sessions/types.js\";\nexport {\n NewWorkspaceAppFlow,\n type NewWorkspaceAppFlowProps,\n type VaultSecretOption,\n} from \"./NewWorkspaceAppFlow.js\";\nexport {\n AssistantChat,\n clearChatStorage,\n type AssistantChatProps,\n type AssistantChatHandle,\n} from \"./AssistantChat.js\";\nexport {\n MultiTabAssistantChat,\n type MultiTabAssistantChatProps,\n type MultiTabAssistantChatHeaderProps,\n} from \"./MultiTabAssistantChat.js\";\nexport { RunStuckBanner, type RunStuckBannerProps } from \"./RunStuckBanner.js\";\nexport {\n useRunStuckDetection,\n useAbortRun,\n type RunStuckState,\n type UseRunStuckDetectionOptions,\n} from \"./use-run-stuck-detection.js\";\nexport { createAgentChatAdapter } from \"./agent-chat-adapter.js\";\nexport {\n AgentComposerFrame,\n type AgentComposerFrameProps,\n PromptComposer,\n AGENT_PROMPT_MAX_INLINE_IMAGE_BYTES,\n AGENT_PROMPT_MAX_INLINE_TEXT_CHARS,\n escapePromptAttachmentAttribute,\n formatPromptWithAttachments,\n isInlineableAgentPromptFile,\n readAgentPromptAttachment,\n type PromptComposerProps,\n type PromptComposerFile,\n type PromptComposerSubmitOptions,\n type AgentPromptAttachment,\n type ReadAgentPromptAttachmentOptions,\n type AgentComposerLayoutVariant,\n type SlashCommand,\n type SkillResult,\n} from \"./composer/index.js\";\nexport type { TiptapComposerHandle } from \"./composer/TiptapComposer.js\";\nexport {\n GuidedQuestionFlow,\n useGuidedQuestionFlow,\n formatGuidedAnswerValue,\n formatGuidedAnswersForAgent,\n getOtherGuidedAnswerText,\n hasGuidedAnswer,\n isOtherGuidedAnswer,\n makeOtherGuidedAnswer,\n normalizeGuidedAnswers,\n type GuidedQuestion,\n type GuidedQuestionAnswers,\n type GuidedQuestionFlowProps,\n type GuidedQuestionOption,\n type GuidedQuestionPayload,\n type GuidedQuestionType,\n type UseGuidedQuestionFlowOptions,\n} from \"./guided-questions.js\";\nexport {\n useChatThreads,\n type ChatThreadScope,\n type ChatThreadSummary,\n type ChatThreadData,\n} from \"./use-chat-threads.js\";\nexport {\n AgentChatSurface,\n AgentPanel,\n AgentSidebar,\n AgentToggleButton,\n focusAgentChat,\n type AgentChatSurfaceMode,\n type AgentChatSurfaceProps,\n type AgentPanelProps,\n type AgentSidebarProps,\n} from \"./AgentPanel.js\";\nexport {\n SIDEBAR_STATE_CHANGE_EVENT,\n type AgentSidebarStateChangeDetail,\n type AgentSidebarStateMode,\n type AgentSidebarStateSource,\n} from \"./agent-sidebar-state.js\";\nexport { AgentNativeIcon } from \"./components/icons/AgentNativeIcon.js\";\nexport { SettingsPanel, type SettingsPanelProps } from \"./settings/index.js\";\nexport { useBuilderStatus } from \"./settings/useBuilderStatus.js\";\nexport {\n openBuilderConnectPopup,\n useBuilderConnectFlow,\n type BuilderConnectFlow,\n type BuilderConnectFlowOptions,\n type OpenBuilderConnectPopupOptions,\n} from \"./settings/useBuilderStatus.js\";\n// Deprecated — use AgentSidebar + AgentToggleButton instead\nexport {\n ProductionAgentPanel,\n type ProductionAgentPanelProps,\n} from \"./ProductionAgentPanel.js\";\nexport {\n useProductionAgent,\n type ProductionAgentMessage,\n type UseProductionAgentOptions,\n type UseProductionAgentResult,\n} from \"./useProductionAgent.js\";\nexport { Turnstile, type TurnstileProps } from \"./Turnstile.js\";\nexport {\n OpenSourceBadge,\n PoweredByBadge,\n type OpenSourceBadgeProps,\n type PoweredByBadgeProps,\n} from \"./PoweredByBadge.js\";\nexport { FeedbackButton, type FeedbackButtonProps } from \"./FeedbackButton.js\";\nexport { ErrorBoundary } from \"./ErrorBoundary.js\";\nexport { installRouteChunkRecovery } from \"./route-chunk-recovery.js\";\nexport { ClientOnly } from \"./ClientOnly.js\";\nexport { DefaultSpinner } from \"./DefaultSpinner.js\";\nexport {\n getThemeInitScript,\n themeInitScript,\n type ThemePreference,\n} from \"./theme.js\";\nexport {\n APPEARANCE_PRESETS,\n applyAppearance,\n getStoredAppearance,\n useAppearance,\n useAppearanceSync,\n type AppearancePresetId,\n} from \"./appearance.js\";\nexport {\n AppearancePicker,\n type AppearancePickerProps,\n} from \"./AppearancePicker.js\";\nexport { AgentTerminal, type AgentTerminalProps } from \"./terminal/index.js\";\nexport {\n trackEvent,\n trackSessionStatus,\n configureTracking,\n setSentryUser,\n captureError,\n captureClientException,\n type ClientCaptureContext,\n} from \"./analytics.js\";\nexport {\n useCollaborativeDoc,\n emailToColor,\n emailToName,\n type UseCollaborativeDocOptions,\n type UseCollaborativeDocResult,\n type CollabUser,\n} from \"../collab/client.js\";\nexport {\n ResourcesPanel,\n ResourceTree,\n ResourceEditor,\n useResources,\n useResourceTree,\n useResource,\n useCreateResource,\n useUpdateResource,\n useDeleteResource,\n useUploadResource,\n type Resource,\n type ResourceMeta,\n type TreeNode,\n type ResourceScope,\n type ResourceTreeProps,\n type ResourceEditorProps,\n} from \"./resources/index.js\";\nexport type {\n AppToFrameMessage,\n FrameToAppMessage,\n FrameMessage,\n CodeCompleteMessage,\n ChatRunningMessage,\n} from \"./frame-protocol.js\";\nexport {\n CommandMenu,\n useCommandMenuShortcut,\n openAgentSidebar,\n submitToAgent,\n type CommandMenuProps,\n type CommandGroupProps,\n type CommandItemProps,\n type CommandShortcutProps,\n} from \"./CommandMenu.js\";\nexport {\n DevOverlay,\n useDevOverlayShortcut,\n registerDevPanel,\n unregisterDevPanel,\n listDevPanels,\n subscribeDevPanels,\n useDevOption,\n clearAllDevOverlayStorage,\n devOptionKey,\n DEV_OVERLAY_STORAGE_PREFIX,\n type DevOverlayProps,\n type DevPanel,\n type DevOption,\n type DevBooleanOption,\n type DevSelectOption,\n type DevStringOption,\n type DevActionOption,\n type DevOptionValue,\n} from \"./dev-overlay/index.js\";\nexport {\n useActionQuery,\n useActionMutation,\n type ActionRegistry,\n} from \"./use-action.js\";\nexport { usePinchZoom, type UsePinchZoomOptions } from \"./use-pinch-zoom.js\";\nexport {\n ShareButton,\n ShareDialog,\n VisibilityBadge,\n type ShareButtonProps,\n type ShareDialogProps,\n type VisibilityBadgeProps,\n} from \"./sharing/index.js\";\nexport {\n postNavigate,\n isInAgentEmbed,\n AGENT_NAVIGATE_MESSAGE_TYPE,\n type AgentNavigateMessage,\n} from \"./embed.js\";\nexport { IframeEmbed, parseEmbedBody } from \"./IframeEmbed.js\";\nexport {\n useAvatarUrl,\n uploadAvatar,\n invalidateAvatarCache,\n} from \"./use-avatar.js\";\nexport {\n ObservabilityDashboard,\n ThumbsFeedback,\n} from \"./observability/index.js\";\n// Presence UI components\nexport {\n PresenceBar,\n type PresenceBarProps,\n} from \"./components/PresenceBar.js\";\nexport {\n AgentPresenceChip,\n type AgentPresenceChipProps,\n} from \"./components/AgentPresenceChip.js\";\n// Structured data collaboration hooks\nexport {\n useCollaborativeMap,\n useCollaborativeArray,\n type UseCollaborativeMapOptions,\n type UseCollaborativeMapResult,\n type UseCollaborativeArrayOptions,\n type UseCollaborativeArrayResult,\n} from \"../collab/client-struct.js\";\nexport { NotificationsBell } from \"./notifications/index.js\";\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type McpUiResourceCsp, type McpUiResourcePermissions } from "@modelcontextprotocol/ext-apps/app-bridge";
|
|
2
|
+
import type { AgentMcpAppPayload } from "../../mcp-client/app-result.js";
|
|
3
|
+
export interface McpAppRendererProps {
|
|
4
|
+
app: AgentMcpAppPayload;
|
|
5
|
+
className?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare function McpAppRenderer({ app, className }: McpAppRendererProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export declare function supportedMcpAppPermissions(permissions: McpUiResourcePermissions | undefined): McpUiResourcePermissions;
|
|
9
|
+
export declare function buildMcpAppCsp(csp: McpUiResourceCsp | undefined): string;
|
|
10
|
+
//# sourceMappingURL=McpAppRenderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpAppRenderer.d.ts","sourceRoot":"","sources":["../../../src/client/mcp-apps/McpAppRenderer.tsx"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,EAC9B,MAAM,2CAA2C,CAAC;AAGnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAQzE,MAAM,WAAW,mBAAmB;IAClC,GAAG,EAAE,kBAAkB,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAQD,wBAAgB,cAAc,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,mBAAmB,2CAmKrE;AAwBD,wBAAgB,0BAA0B,CACxC,WAAW,EAAE,wBAAwB,GAAG,SAAS,GAChD,wBAAwB,CAE1B;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,gBAAgB,GAAG,SAAS,GAAG,MAAM,CAiBxE"}
|