{"version":3,"file":"AIUIHost.mjs","names":[],"sources":["../../../../../src/plugins/AIComponents/GenerativeUI/AIUIHost.ts"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport type { AIMessage } from '../Conversation/types';\nimport { type AIUIAction, aiUIActionProblem } from './AIUIAction';\nimport type { AIUIComponent } from './AIUIComponent';\nimport { aiUIComponentDefinitionJSON } from './AIUIComponentDefinition';\nimport { type AIUIDocument, isSameAIUIDocument } from './AIUIDocument';\nimport { type AIUIEngine, type AIUIRenderer, aiUIRendererReads } from './AIUIRenderer';\nimport {\n  type AIUIClientTool,\n  type AIUIClientToolDefinition,\n  aiUIClientToolJSON,\n  AIUIToolError,\n  isJSONValue,\n} from './AIUITools';\n\nexport type { AIUIClientTool, AIUIClientToolDefinition } from './AIUITools';\n\nexport type AIUIHostOptions = {\n  /** The renderer of each format the agent writes, the first one listed asked first. */\n  renderers: AIUIRenderer[];\n  /**\n   * Sends what the person did to the agent, as their next message, such as\n   * `session.responses.create(action.label, { uiAction: aiUIActionJSON(action) })`.\n   */\n  send: (action: AIUIAction) => Promise<unknown> | unknown;\n  /** The app's views the agent can place. */\n  components?: AIUIComponent[];\n  /** Tells the app that an action could not be sent. It is logged by default. */\n  onError?: (error: unknown, action: AIUIAction) => void;\n  /**\n   * Tells the app that a reply's UI, or a part of it, failed to show: a reply's UI that throws\n   * shows the reply's text instead, and one of the app's components that throws leaves only\n   * itself out. It is logged by default.\n   */\n  onRenderError?: (error: unknown, messageId: string) => void;\n  /**\n   * Opens a link from a reply's UI. By default, web and email links open and others don't: the\n   * agent writes the links, so another could call someone or act in another app.\n   */\n  open?: (url: URL) => void;\n  /**\n   * The app's tools a reply's UI can run, described to the agent's model. One that isn't\n   * read-only runs only from something the person did, such as a tap.\n   */\n  tools?: AIUIClientTool[];\n};\n\nconst WEB_OR_EMAIL = new Set(['http:', 'https:', 'mailto:']);\n\n/** Whether a link is one a reply's UI may open by default: a web or email link. */\nexport const isWebOrEmailLink = (url: URL) =>\n  WEB_OR_EMAIL.has(url.protocol.toLowerCase());\n\nconst openWebOrEmailLink = (url: URL) => {\n  if (!isWebOrEmailLink(url)) {\n    console.warn(\n      `A reply's UI asked to open ${url.href}, which isn't a web or email link`,\n    );\n    return;\n  }\n  if (typeof window === 'undefined') return;\n  if (url.protocol === 'mailto:') window.location.assign(url.href);\n  else window.open(url.href, '_blank', 'noopener,noreferrer');\n};\n\n/**\n * The generated UI of one conversation: the renderers of the formats the agent writes, the\n * app's components and tools, what each reply's UI was left in, and where what the person does\n * goes. Give it to `AIConversation` as `ui`; keep one per conversation, for as long as it shows.\n * The counterpart of `AIUIHost` in StreamChatAI.\n */\nexport class AIUIHost {\n  readonly components: AIUIComponent[];\n  readonly renderers: AIUIRenderer[];\n\n  private readonly engines = new Map<AIUIRenderer, AIUIEngine>();\n  private readonly failed = new Set<string>();\n  private lastSend: Promise<void> = Promise.resolve();\n  private readonly listeners = new Set<() => void>();\n  private readonly options: AIUIHostOptions;\n  private readonly received = new Map<string, AIUIDocument>();\n  private readonly states = new Map<string, unknown>();\n  private readonly tools: Map<string, AIUIClientTool>;\n  private refreshing = false;\n  private version = 0;\n\n  constructor(options: AIUIHostOptions) {\n    this.options = options;\n    this.renderers = options.renderers;\n    this.components = options.components ?? [];\n    this.tools = new Map();\n    for (const tool of options.tools ?? []) {\n      if (!this.tools.has(tool.name)) this.tools.set(tool.name, tool);\n    }\n  }\n\n  /** The names of the app's tools a reply's UI can run with `runTool`. */\n  get toolNames() {\n    return [...this.tools.keys()];\n  }\n\n  /** The app's tools a reply's UI can run, as the agent's model reads them. */\n  get toolDefinitions(): AIUIClientToolDefinition[] {\n    return [...this.tools.values()].map(\n      ({ description, inputSchema, name, readOnly }) => ({\n        name,\n        ...(description ? { description } : {}),\n        ...(inputSchema ? { inputSchema } : {}),\n        ...(readOnly ? { readOnly } : {}),\n      }),\n    );\n  }\n\n  /** The app's component the agent places by `name`. */\n  component(name: string) {\n    return this.components.find((component) => component.definition.name === name);\n  }\n\n  /**\n   * Whether one of its renderers reads `document`. The one that does can still show nothing of\n   * its own for a reply, which then shows its text, as `content` tells.\n   */\n  canShow(document: AIUIDocument) {\n    return this.renderers.some((renderer) => aiUIRendererReads(renderer, document));\n  }\n\n  /**\n   * The view of a reply's document from the first renderer that reads its format and version,\n   * or `null` when none shows anything of its own, so the reply shows its text. `AIUIView` puts\n   * it on screen; `AIConversation` does it for every reply.\n   */\n  content(document: AIUIDocument, messageId: string): ReactNode | null {\n    if (this.failed.has(messageId)) return null;\n    const renderer = this.renderers.find((candidate) =>\n      aiUIRendererReads(candidate, document),\n    );\n    return renderer ? (this.engineOf(renderer).view(document, messageId) ?? null) : null;\n  }\n\n  /**\n   * Gives its renderers the UI of the conversation's replies, oldest first, as each arrives or\n   * changes, whether or not the reply is on screen, so a format whose later replies change an\n   * earlier one's UI follows them all. It also tells them when a reply leaves the conversation,\n   * or its UI does, such as when it is deleted. `AIConversation` does it: call it with the\n   * conversation's messages when you show replies yourself with `AIUIView`.\n   */\n  receive(messages: AIMessage[]) {\n    const documents = new Map<string, AIUIDocument>();\n    for (const message of messages) {\n      if (message.role !== 'user' && message.uiDocument) {\n        documents.set(message.id, message.uiDocument);\n      }\n    }\n    const left: [string, AIUIDocument][] = [];\n    for (const [messageId, document] of [...this.received]) {\n      if (documents.has(messageId)) continue;\n      this.received.delete(messageId);\n      left.push([messageId, document]);\n    }\n    for (const [messageId, document] of documents) {\n      const before = this.received.get(messageId);\n      if (isSameAIUIDocument(before, document)) continue;\n      this.received.set(messageId, document);\n      // A reply whose UI failed while it was written gets one more try once it is written.\n      if (before && !document.isStreaming) this.failed.delete(messageId);\n      const renderer = this.renderers.find((candidate) =>\n        aiUIRendererReads(candidate, document),\n      );\n      if (renderer) this.engineOf(renderer).receive?.(document, messageId);\n    }\n    // Forgets the replies that left once the conversation has rendered without them, since\n    // this runs while it renders, and a render React throws away must not lose what a reply\n    // was left in.\n    if (left.length) {\n      queueMicrotask(() => {\n        for (const [messageId, document] of left) {\n          if (this.received.has(messageId)) continue;\n          this.states.delete(messageId);\n          this.failed.delete(messageId);\n          const renderer = this.renderers.find((candidate) =>\n            aiUIRendererReads(candidate, document),\n          );\n          if (renderer) this.engineOf(renderer).remove?.(messageId);\n        }\n      });\n    }\n  }\n\n  /**\n   * Sends what the person did to the agent, after everything sent before it, so the agent gets\n   * a reply's actions in the order they happened. Resolves to whether it was sent: one the\n   * agent's backend would refuse, or that fails to send, goes to `onError`, resolves to\n   * `false`, and does not hold up the ones after it.\n   */\n  send(action: AIUIAction): Promise<boolean> {\n    const report = (error: unknown) => {\n      if (this.options.onError) this.options.onError(error, action);\n      else console.error(\"Couldn't send what the person did in a reply's UI\", error);\n    };\n    const problem = aiUIActionProblem(action);\n    if (problem) {\n      report(new Error(problem));\n      return Promise.resolve(false);\n    }\n    const sent = this.lastSend.then(async () => {\n      try {\n        await this.options.send(action);\n        return true;\n      } catch (error) {\n        report(error);\n        return false;\n      }\n    });\n    this.lastSend = sent.then(() => undefined);\n    return sent;\n  }\n\n  /**\n   * Whether a reply's UI failed to show (`fail`), so its text shows in its place. It stops being\n   * failed as `fail` says: once the reply leaves the conversation, or, for a reply that failed\n   * while it was written, once it is written.\n   */\n  hasFailed(messageId: string) {\n    return this.failed.has(messageId);\n  }\n\n  /**\n   * Shows a reply's text in place of its UI, which failed to show, and tells the app. It lasts\n   * while the reply is in the conversation, or, for a reply still being written, until it is\n   * written. `AIConversation` and `AIUIView` do it.\n   */\n  fail(messageId: string, error: unknown) {\n    if (this.failed.has(messageId)) return;\n    this.failed.add(messageId);\n    if (this.options.onRenderError) this.options.onRenderError(error, messageId);\n    else console.error(`A reply's UI failed to show, so its text shows instead`, error);\n    this.refresh();\n  }\n\n  /**\n   * Tells the app that a part of a reply's UI failed to show, such as one of the app's\n   * components that threw, while the rest of it still shows. `AIUIComponentView` calls it.\n   */\n  reportRenderError(error: unknown, messageId: string) {\n    if (this.options.onRenderError) this.options.onRenderError(error, messageId);\n    else console.error(`A part of a reply's UI failed to show, so it is left out`, error);\n  }\n\n  /**\n   * Has the conversation show its replies again, because what one of them shows changed since\n   * it was last asked: its renderer's runtime loaded, or a finished reply turned out to show\n   * nothing of its own. Renderers call it; the conversation shows them again after the current\n   * render, however many times it is called in it.\n   */\n  refresh() {\n    if (this.refreshing) return;\n    this.refreshing = true;\n    queueMicrotask(() => {\n      this.refreshing = false;\n      this.version++;\n      this.listeners.forEach((listener) => listener());\n    });\n  }\n\n  /** Calls `listener` each time the conversation should show its replies again. */\n  subscribe = (listener: () => void) => {\n    this.listeners.add(listener);\n    return () => {\n      this.listeners.delete(listener);\n    };\n  };\n\n  /** A number that changes each time the conversation should show its replies again. */\n  getVersion = () => this.version;\n\n  /**\n   * Runs one of the app's tools for a reply's UI, such as to load data on this device. One that\n   * isn't read-only runs only when `userInitiated`, from something the person did, rather than\n   * as the reply shows. Rejects with an `AIUIToolError` when the tool can't run, fails, or gives\n   * what isn't JSON.\n   */\n  async runTool(\n    name: string,\n    args: Record<string, unknown> = {},\n    { userInitiated = false }: { userInitiated?: boolean } = {},\n  ): Promise<unknown> {\n    const tool = this.tools.get(name);\n    if (!tool) throw new AIUIToolError(name, `No tool named ${name}`);\n    if (!tool.readOnly && !userInitiated) {\n      throw new AIUIToolError(\n        name,\n        `${name} changes something, so it runs only from something the person did`,\n      );\n    }\n    let output: unknown;\n    try {\n      output = await tool.run(args);\n    } catch (error) {\n      throw new AIUIToolError(name, `${name} failed: ${String(error)}`, { cause: error });\n    }\n    if (!isJSONValue(output)) {\n      throw new AIUIToolError(name, `${name} gave what isn't JSON`);\n    }\n    return output;\n  }\n\n  /** Opens a link from a reply's UI, as the host's `open` allows. */\n  open(url: URL | string) {\n    let link: URL;\n    try {\n      link = typeof url === 'string' ? new URL(url) : url;\n    } catch {\n      console.warn(`A reply's UI asked to open ${String(url)}, which isn't a link`);\n      return;\n    }\n    (this.options.open ?? openWebOrEmailLink)(link);\n  }\n\n  /** The state a reply's UI was left in, such as a form's values, kept while the host is. */\n  state(messageId: string): unknown {\n    return this.states.get(messageId);\n  }\n\n  /** Keeps the state a reply's UI was left in. `undefined` forgets it. */\n  setState(messageId: string, state: unknown) {\n    if (state === undefined) this.states.delete(messageId);\n    else this.states.set(messageId, state);\n  }\n\n  /**\n   * What the agent's backend needs to write UI this app shows: each format it reads, with what\n   * its renderer adds, such as the model's instructions, the app's components, and its tools.\n   * A renderer may load its format's packages to write them, so this resolves once they are\n   * written.\n   */\n  async capabilities() {\n    const tools = this.toolDefinitions;\n    return {\n      components: this.components.map(({ definition }) =>\n        aiUIComponentDefinitionJSON(definition),\n      ),\n      renderers: await Promise.all(\n        this.renderers.map(async (renderer) => ({\n          ...(await renderer.capabilities?.(this.components, tools)),\n          format: renderer.format,\n        })),\n      ),\n      ...(tools.length ? { tools: tools.map(aiUIClientToolJSON) } : {}),\n      v: 1,\n    };\n  }\n\n  // The engine of a renderer, made the first time it is needed and kept as the host is.\n  private engineOf(renderer: AIUIRenderer) {\n    let engine = this.engines.get(renderer);\n    if (!engine) {\n      engine = renderer.createEngine(this);\n      this.engines.set(renderer, engine);\n    }\n    return engine;\n  }\n}\n"],"mappings":";;;;;;AAgDA,IAAM,+BAAe,IAAI,IAAI;CAAC;CAAS;CAAU;AAAS,CAAC;;AAG3D,IAAa,oBAAoB,QAC/B,aAAa,IAAI,IAAI,SAAS,YAAY,CAAC;AAE7C,IAAM,sBAAsB,QAAa;CACvC,IAAI,CAAC,iBAAiB,GAAG,GAAG;EAC1B,QAAQ,KACN,8BAA8B,IAAI,KAAK,kCACzC;EACA;CACF;CACA,IAAI,OAAO,WAAW,aAAa;CACnC,IAAI,IAAI,aAAa,WAAW,OAAO,SAAS,OAAO,IAAI,IAAI;MAC1D,OAAO,KAAK,IAAI,MAAM,UAAU,qBAAqB;AAC5D;;;;;;;AAQA,IAAa,WAAb,MAAsB;CACpB;CACA;CAEA,0BAA2B,IAAI,IAA8B;CAC7D,yBAA0B,IAAI,IAAY;CAC1C,WAAkC,QAAQ,QAAQ;CAClD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