@noodleseed/assistant 1.6.0 → 1.8.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.
Files changed (50) hide show
  1. package/README.md +78 -20
  2. package/dist/{chunk-UXPKSCID.js → chunk-3YYTUJPJ.js} +2 -2
  3. package/dist/{chunk-NSBPE2FW.js → chunk-5FUTL2UF.js} +6 -1
  4. package/dist/chunk-BLMJHF7U.js +544 -0
  5. package/dist/chunk-BLMJHF7U.js.map +1 -0
  6. package/dist/{chunk-ZKXOX67J.js → chunk-JMBUJSFP.js} +233 -87
  7. package/dist/chunk-JMBUJSFP.js.map +1 -0
  8. package/dist/chunk-RYQBXTLR.js +9089 -0
  9. package/dist/chunk-RYQBXTLR.js.map +1 -0
  10. package/dist/{client-9kup0-ws.d.cts → client-BxoNZkWp.d.cts} +50 -1
  11. package/dist/{client-BRjZMXlk.d.ts → client-ERQCAH_0.d.ts} +50 -1
  12. package/dist/client.cjs +22983 -94
  13. package/dist/client.cjs.map +1 -1
  14. package/dist/client.d.cts +2 -1
  15. package/dist/client.d.ts +2 -1
  16. package/dist/client.js +3 -2
  17. package/dist/index.cjs +10706 -2177
  18. package/dist/index.cjs.map +1 -1
  19. package/dist/index.d.cts +3 -2
  20. package/dist/index.d.ts +3 -2
  21. package/dist/index.js +4 -4
  22. package/dist/react/client.cjs +23688 -0
  23. package/dist/react/client.cjs.map +1 -0
  24. package/dist/react/client.d.cts +24 -0
  25. package/dist/react/client.d.ts +24 -0
  26. package/dist/react/client.js +76 -0
  27. package/dist/react/client.js.map +1 -0
  28. package/dist/react.cjs +10706 -2176
  29. package/dist/react.cjs.map +1 -1
  30. package/dist/react.d.cts +2 -1
  31. package/dist/react.d.ts +2 -1
  32. package/dist/react.js +7 -6
  33. package/dist/react.js.map +1 -1
  34. package/dist/server.cjs.map +1 -1
  35. package/dist/server.d.cts +3 -0
  36. package/dist/server.d.ts +3 -0
  37. package/dist/server.js +1 -1
  38. package/dist/server.js.map +1 -1
  39. package/dist/token-Y6KCR3JT.js +70 -0
  40. package/dist/token-Y6KCR3JT.js.map +1 -0
  41. package/dist/token-util-XFYMRPAB.js +6 -0
  42. package/dist/{v4-2UXPDMWJ.js → v4-KBRL3YLO.js} +3 -3
  43. package/dist/v4-KBRL3YLO.js.map +1 -0
  44. package/package.json +14 -3
  45. package/dist/chunk-GTYYQNGT.js +0 -708
  46. package/dist/chunk-GTYYQNGT.js.map +0 -1
  47. package/dist/chunk-ZKXOX67J.js.map +0 -1
  48. /package/dist/{chunk-UXPKSCID.js.map → chunk-3YYTUJPJ.js.map} +0 -0
  49. /package/dist/{chunk-NSBPE2FW.js.map → chunk-5FUTL2UF.js.map} +0 -0
  50. /package/dist/{v4-2UXPDMWJ.js.map → token-util-XFYMRPAB.js.map} +0 -0
package/dist/react.d.cts CHANGED
@@ -1,7 +1,8 @@
1
1
  import { RefAttributes, ReactElement } from 'react';
2
2
  import { A as AssistantThemeMode } from './appearance-DowzFJjh.cjs';
3
3
  import { AssistantAppearance, AssistantAppearanceWarning, NoodleAssistantElement } from './index.cjs';
4
- import { A as AssistantPageContext, a as AssistantContext, b as AssistantModelContextUpdate, c as AssistantClientEvent, d as AssistantErrorDetail } from './client-9kup0-ws.cjs';
4
+ import { A as AssistantPageContext, a as AssistantContext, d as AssistantModelContextUpdate, e as AssistantClientEvent, f as AssistantErrorDetail } from './client-BxoNZkWp.cjs';
5
+ import 'ai';
5
6
 
6
7
  interface NoodleAssistantProps<TPageContext extends AssistantPageContext = AssistantContext> {
7
8
  readonly sessionEndpoint: string;
package/dist/react.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  import { RefAttributes, ReactElement } from 'react';
2
2
  import { A as AssistantThemeMode } from './appearance-DowzFJjh.js';
3
3
  import { AssistantAppearance, AssistantAppearanceWarning, NoodleAssistantElement } from './index.js';
4
- import { A as AssistantPageContext, a as AssistantContext, b as AssistantModelContextUpdate, c as AssistantClientEvent, d as AssistantErrorDetail } from './client-BRjZMXlk.js';
4
+ import { A as AssistantPageContext, a as AssistantContext, d as AssistantModelContextUpdate, e as AssistantClientEvent, f as AssistantErrorDetail } from './client-ERQCAH_0.js';
5
+ import 'ai';
5
6
 
6
7
  interface NoodleAssistantProps<TPageContext extends AssistantPageContext = AssistantContext> {
7
8
  readonly sessionEndpoint: string;
package/dist/react.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  registerNoodleAssistant
3
- } from "./chunk-ZKXOX67J.js";
4
- import "./chunk-GTYYQNGT.js";
5
- import "./chunk-UXPKSCID.js";
6
- import "./chunk-NSBPE2FW.js";
3
+ } from "./chunk-JMBUJSFP.js";
4
+ import "./chunk-RYQBXTLR.js";
5
+ import "./chunk-3YYTUJPJ.js";
6
+ import "./chunk-5FUTL2UF.js";
7
7
 
8
8
  // src/react.ts
9
9
  import {
@@ -38,6 +38,7 @@ var NoodleAssistantWithRef = forwardRef(
38
38
  registerNoodleAssistant();
39
39
  element.sessionEndpoint = props.sessionEndpoint;
40
40
  element.appearance = props.appearance;
41
+ element.toggleAttribute("open", props.open === true);
41
42
  if (props.context) element.updateContext(props.context);
42
43
  if (props.pageContext) element.updatePageContext(props.pageContext);
43
44
  if (props.modelContext) element.updateModelContext(props.modelContext);
@@ -58,6 +59,7 @@ var NoodleAssistantWithRef = forwardRef(
58
59
  props.onEvent,
59
60
  props.onReady,
60
61
  props.onSessionExpired,
62
+ props.open,
61
63
  props.pageContext,
62
64
  props.sessionEndpoint
63
65
  ]);
@@ -65,8 +67,7 @@ var NoodleAssistantWithRef = forwardRef(
65
67
  ref,
66
68
  class: props.className,
67
69
  "session-endpoint": props.sessionEndpoint,
68
- ...props.theme ? { theme: props.theme } : {},
69
- ...props.open ? { open: "" } : {}
70
+ ...props.theme ? { theme: props.theme } : {}
70
71
  });
71
72
  }
72
73
  );
package/dist/react.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/react.ts"],"sourcesContent":["import {\n createElement,\n forwardRef,\n type ReactElement,\n type RefAttributes,\n useEffect,\n useImperativeHandle,\n useRef,\n} from 'react';\nimport type { AssistantThemeMode } from './appearance.js';\nimport type { AssistantAppearance, AssistantAppearanceWarning } from './host-appearance.js';\n\nexport type { AssistantAppearance, AssistantAppearanceWarning } from './host-appearance.js';\n\nimport type {\n AssistantClientEvent,\n AssistantContext,\n AssistantModelContextUpdate,\n AssistantPageContext,\n} from './client.js';\nimport { type NoodleAssistantElement, registerNoodleAssistant } from './element.js';\nimport type { AssistantErrorDetail } from './transport.js';\n\nexport interface NoodleAssistantProps<\n TPageContext extends AssistantPageContext = AssistantContext,\n> {\n readonly sessionEndpoint: string;\n readonly theme?: AssistantThemeMode;\n readonly appearance?: AssistantAppearance;\n readonly open?: boolean;\n readonly className?: string;\n readonly context?: AssistantContext;\n readonly pageContext?: TPageContext;\n readonly modelContext?: AssistantModelContextUpdate;\n readonly onEvent?: (event: AssistantClientEvent) => void;\n readonly onReady?: () => void;\n readonly onError?: (error: AssistantErrorDetail) => void;\n readonly onAppearanceWarning?: (warning: AssistantAppearanceWarning) => void;\n readonly onSessionExpired?: () => void;\n}\n\nconst NoodleAssistantWithRef = forwardRef<NoodleAssistantElement, NoodleAssistantProps>(\n function NoodleAssistant(props, forwardedRef): ReactElement {\n const ref = useRef<NoodleAssistantElement>(null);\n const readyNotified = useRef(false);\n useImperativeHandle(forwardedRef, () => ref.current as NoodleAssistantElement, []);\n useEffect(() => {\n const element = ref.current;\n if (!element) return;\n const ready = () => {\n if (readyNotified.current) return;\n readyNotified.current = true;\n props.onReady?.();\n };\n const error = (event: Event) =>\n props.onError?.((event as CustomEvent<AssistantErrorDetail>).detail);\n const expired = () => props.onSessionExpired?.();\n const assistantEvent = (event: Event) =>\n props.onEvent?.((event as CustomEvent<AssistantClientEvent>).detail);\n const appearanceWarning = (event: Event) =>\n props.onAppearanceWarning?.((event as CustomEvent<AssistantAppearanceWarning>).detail);\n element.addEventListener('assistant-ready', ready);\n element.addEventListener('assistant-error', error);\n element.addEventListener('assistant-session-expired', expired);\n element.addEventListener('assistant-event', assistantEvent);\n element.addEventListener('assistant-appearance-warning', appearanceWarning);\n registerNoodleAssistant();\n element.sessionEndpoint = props.sessionEndpoint;\n element.appearance = props.appearance;\n if (props.context) element.updateContext(props.context);\n if (props.pageContext) element.updatePageContext(props.pageContext);\n if (props.modelContext) element.updateModelContext(props.modelContext);\n // The canonical entry may have registered and upgraded the element before this effect ran.\n // Readiness is sticky once the shadow root exists, so late React listeners still fire once.\n if (element.shadowRoot) ready();\n return () => {\n element.removeEventListener('assistant-ready', ready);\n element.removeEventListener('assistant-error', error);\n element.removeEventListener('assistant-session-expired', expired);\n element.removeEventListener('assistant-event', assistantEvent);\n element.removeEventListener('assistant-appearance-warning', appearanceWarning);\n };\n }, [\n props.context,\n props.appearance,\n props.modelContext,\n props.onError,\n props.onAppearanceWarning,\n props.onEvent,\n props.onReady,\n props.onSessionExpired,\n props.pageContext,\n props.sessionEndpoint,\n ]);\n return createElement('noodle-assistant', {\n ref,\n class: props.className,\n 'session-endpoint': props.sessionEndpoint,\n ...(props.theme ? { theme: props.theme } : {}),\n ...(props.open ? { open: '' } : {}),\n });\n },\n);\n\nexport const NoodleAssistant = NoodleAssistantWithRef as <\n TPageContext extends AssistantPageContext = AssistantContext,\n>(\n props: NoodleAssistantProps<TPageContext> & RefAttributes<NoodleAssistantElement>,\n) => ReactElement;\n"],"mappings":";;;;;;;;AAAA;AAAA,EACE;AAAA,EACA;AAAA,EAGA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAiCP,IAAM,yBAAyB;AAAA,EAC7B,SAAS,gBAAgB,OAAO,cAA4B;AAC1D,UAAM,MAAM,OAA+B,IAAI;AAC/C,UAAM,gBAAgB,OAAO,KAAK;AAClC,wBAAoB,cAAc,MAAM,IAAI,SAAmC,CAAC,CAAC;AACjF,cAAU,MAAM;AACd,YAAM,UAAU,IAAI;AACpB,UAAI,CAAC,QAAS;AACd,YAAM,QAAQ,MAAM;AAClB,YAAI,cAAc,QAAS;AAC3B,sBAAc,UAAU;AACxB,cAAM,UAAU;AAAA,MAClB;AACA,YAAM,QAAQ,CAAC,UACb,MAAM,UAAW,MAA4C,MAAM;AACrE,YAAM,UAAU,MAAM,MAAM,mBAAmB;AAC/C,YAAM,iBAAiB,CAAC,UACtB,MAAM,UAAW,MAA4C,MAAM;AACrE,YAAM,oBAAoB,CAAC,UACzB,MAAM,sBAAuB,MAAkD,MAAM;AACvF,cAAQ,iBAAiB,mBAAmB,KAAK;AACjD,cAAQ,iBAAiB,mBAAmB,KAAK;AACjD,cAAQ,iBAAiB,6BAA6B,OAAO;AAC7D,cAAQ,iBAAiB,mBAAmB,cAAc;AAC1D,cAAQ,iBAAiB,gCAAgC,iBAAiB;AAC1E,8BAAwB;AACxB,cAAQ,kBAAkB,MAAM;AAChC,cAAQ,aAAa,MAAM;AAC3B,UAAI,MAAM,QAAS,SAAQ,cAAc,MAAM,OAAO;AACtD,UAAI,MAAM,YAAa,SAAQ,kBAAkB,MAAM,WAAW;AAClE,UAAI,MAAM,aAAc,SAAQ,mBAAmB,MAAM,YAAY;AAGrE,UAAI,QAAQ,WAAY,OAAM;AAC9B,aAAO,MAAM;AACX,gBAAQ,oBAAoB,mBAAmB,KAAK;AACpD,gBAAQ,oBAAoB,mBAAmB,KAAK;AACpD,gBAAQ,oBAAoB,6BAA6B,OAAO;AAChE,gBAAQ,oBAAoB,mBAAmB,cAAc;AAC7D,gBAAQ,oBAAoB,gCAAgC,iBAAiB;AAAA,MAC/E;AAAA,IACF,GAAG;AAAA,MACD,MAAM;AAAA,MACN,MAAM;AAAA,MACN,MAAM;AAAA,MACN,MAAM;AAAA,MACN,MAAM;AAAA,MACN,MAAM;AAAA,MACN,MAAM;AAAA,MACN,MAAM;AAAA,MACN,MAAM;AAAA,MACN,MAAM;AAAA,IACR,CAAC;AACD,WAAO,cAAc,oBAAoB;AAAA,MACvC;AAAA,MACA,OAAO,MAAM;AAAA,MACb,oBAAoB,MAAM;AAAA,MAC1B,GAAI,MAAM,QAAQ,EAAE,OAAO,MAAM,MAAM,IAAI,CAAC;AAAA,MAC5C,GAAI,MAAM,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;AAAA,IACnC,CAAC;AAAA,EACH;AACF;AAEO,IAAMA,mBAAkB;","names":["NoodleAssistant"]}
1
+ {"version":3,"sources":["../src/react.ts"],"sourcesContent":["import {\n createElement,\n forwardRef,\n type ReactElement,\n type RefAttributes,\n useEffect,\n useImperativeHandle,\n useRef,\n} from 'react';\nimport type { AssistantThemeMode } from './appearance.js';\nimport type { AssistantAppearance, AssistantAppearanceWarning } from './host-appearance.js';\n\nexport type { AssistantAppearance, AssistantAppearanceWarning } from './host-appearance.js';\n\nimport type {\n AssistantClientEvent,\n AssistantContext,\n AssistantModelContextUpdate,\n AssistantPageContext,\n} from './client.js';\nimport { type NoodleAssistantElement, registerNoodleAssistant } from './element.js';\nimport type { AssistantErrorDetail } from './transport.js';\n\nexport interface NoodleAssistantProps<\n TPageContext extends AssistantPageContext = AssistantContext,\n> {\n readonly sessionEndpoint: string;\n readonly theme?: AssistantThemeMode;\n readonly appearance?: AssistantAppearance;\n readonly open?: boolean;\n readonly className?: string;\n readonly context?: AssistantContext;\n readonly pageContext?: TPageContext;\n readonly modelContext?: AssistantModelContextUpdate;\n readonly onEvent?: (event: AssistantClientEvent) => void;\n readonly onReady?: () => void;\n readonly onError?: (error: AssistantErrorDetail) => void;\n readonly onAppearanceWarning?: (warning: AssistantAppearanceWarning) => void;\n readonly onSessionExpired?: () => void;\n}\n\nconst NoodleAssistantWithRef = forwardRef<NoodleAssistantElement, NoodleAssistantProps>(\n function NoodleAssistant(props, forwardedRef): ReactElement {\n const ref = useRef<NoodleAssistantElement>(null);\n const readyNotified = useRef(false);\n useImperativeHandle(forwardedRef, () => ref.current as NoodleAssistantElement, []);\n useEffect(() => {\n const element = ref.current;\n if (!element) return;\n const ready = () => {\n if (readyNotified.current) return;\n readyNotified.current = true;\n props.onReady?.();\n };\n const error = (event: Event) =>\n props.onError?.((event as CustomEvent<AssistantErrorDetail>).detail);\n const expired = () => props.onSessionExpired?.();\n const assistantEvent = (event: Event) =>\n props.onEvent?.((event as CustomEvent<AssistantClientEvent>).detail);\n const appearanceWarning = (event: Event) =>\n props.onAppearanceWarning?.((event as CustomEvent<AssistantAppearanceWarning>).detail);\n element.addEventListener('assistant-ready', ready);\n element.addEventListener('assistant-error', error);\n element.addEventListener('assistant-session-expired', expired);\n element.addEventListener('assistant-event', assistantEvent);\n element.addEventListener('assistant-appearance-warning', appearanceWarning);\n registerNoodleAssistant();\n element.sessionEndpoint = props.sessionEndpoint;\n element.appearance = props.appearance;\n element.toggleAttribute('open', props.open === true);\n if (props.context) element.updateContext(props.context);\n if (props.pageContext) element.updatePageContext(props.pageContext);\n if (props.modelContext) element.updateModelContext(props.modelContext);\n // The canonical entry may have registered and upgraded the element before this effect ran.\n // Readiness is sticky once the shadow root exists, so late React listeners still fire once.\n if (element.shadowRoot) ready();\n return () => {\n element.removeEventListener('assistant-ready', ready);\n element.removeEventListener('assistant-error', error);\n element.removeEventListener('assistant-session-expired', expired);\n element.removeEventListener('assistant-event', assistantEvent);\n element.removeEventListener('assistant-appearance-warning', appearanceWarning);\n };\n }, [\n props.context,\n props.appearance,\n props.modelContext,\n props.onError,\n props.onAppearanceWarning,\n props.onEvent,\n props.onReady,\n props.onSessionExpired,\n props.open,\n props.pageContext,\n props.sessionEndpoint,\n ]);\n return createElement('noodle-assistant', {\n ref,\n class: props.className,\n 'session-endpoint': props.sessionEndpoint,\n ...(props.theme ? { theme: props.theme } : {}),\n });\n },\n);\n\nexport const NoodleAssistant = NoodleAssistantWithRef as <\n TPageContext extends AssistantPageContext = AssistantContext,\n>(\n props: NoodleAssistantProps<TPageContext> & RefAttributes<NoodleAssistantElement>,\n) => ReactElement;\n"],"mappings":";;;;;;;;AAAA;AAAA,EACE;AAAA,EACA;AAAA,EAGA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAiCP,IAAM,yBAAyB;AAAA,EAC7B,SAAS,gBAAgB,OAAO,cAA4B;AAC1D,UAAM,MAAM,OAA+B,IAAI;AAC/C,UAAM,gBAAgB,OAAO,KAAK;AAClC,wBAAoB,cAAc,MAAM,IAAI,SAAmC,CAAC,CAAC;AACjF,cAAU,MAAM;AACd,YAAM,UAAU,IAAI;AACpB,UAAI,CAAC,QAAS;AACd,YAAM,QAAQ,MAAM;AAClB,YAAI,cAAc,QAAS;AAC3B,sBAAc,UAAU;AACxB,cAAM,UAAU;AAAA,MAClB;AACA,YAAM,QAAQ,CAAC,UACb,MAAM,UAAW,MAA4C,MAAM;AACrE,YAAM,UAAU,MAAM,MAAM,mBAAmB;AAC/C,YAAM,iBAAiB,CAAC,UACtB,MAAM,UAAW,MAA4C,MAAM;AACrE,YAAM,oBAAoB,CAAC,UACzB,MAAM,sBAAuB,MAAkD,MAAM;AACvF,cAAQ,iBAAiB,mBAAmB,KAAK;AACjD,cAAQ,iBAAiB,mBAAmB,KAAK;AACjD,cAAQ,iBAAiB,6BAA6B,OAAO;AAC7D,cAAQ,iBAAiB,mBAAmB,cAAc;AAC1D,cAAQ,iBAAiB,gCAAgC,iBAAiB;AAC1E,8BAAwB;AACxB,cAAQ,kBAAkB,MAAM;AAChC,cAAQ,aAAa,MAAM;AAC3B,cAAQ,gBAAgB,QAAQ,MAAM,SAAS,IAAI;AACnD,UAAI,MAAM,QAAS,SAAQ,cAAc,MAAM,OAAO;AACtD,UAAI,MAAM,YAAa,SAAQ,kBAAkB,MAAM,WAAW;AAClE,UAAI,MAAM,aAAc,SAAQ,mBAAmB,MAAM,YAAY;AAGrE,UAAI,QAAQ,WAAY,OAAM;AAC9B,aAAO,MAAM;AACX,gBAAQ,oBAAoB,mBAAmB,KAAK;AACpD,gBAAQ,oBAAoB,mBAAmB,KAAK;AACpD,gBAAQ,oBAAoB,6BAA6B,OAAO;AAChE,gBAAQ,oBAAoB,mBAAmB,cAAc;AAC7D,gBAAQ,oBAAoB,gCAAgC,iBAAiB;AAAA,MAC/E;AAAA,IACF,GAAG;AAAA,MACD,MAAM;AAAA,MACN,MAAM;AAAA,MACN,MAAM;AAAA,MACN,MAAM;AAAA,MACN,MAAM;AAAA,MACN,MAAM;AAAA,MACN,MAAM;AAAA,MACN,MAAM;AAAA,MACN,MAAM;AAAA,MACN,MAAM;AAAA,MACN,MAAM;AAAA,IACR,CAAC;AACD,WAAO,cAAc,oBAAoB;AAAA,MACvC;AAAA,MACA,OAAO,MAAM;AAAA,MACb,oBAAoB,MAAM;AAAA,MAC1B,GAAI,MAAM,QAAQ,EAAE,OAAO,MAAM,MAAM,IAAI,CAAC;AAAA,IAC9C,CAAC;AAAA,EACH;AACF;AAEO,IAAMA,mBAAkB;","names":["NoodleAssistant"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/server.ts"],"sourcesContent":["import type { AssistantConfiguration } from './appearance.js';\n\nexport interface CreateAssistantSessionInput {\n readonly serviceUrl: string;\n readonly clientId: string;\n readonly clientSecret: string;\n /** Browser origin to bind into the short-lived assistant session. */\n readonly origin: string;\n readonly user: {\n readonly id: string;\n readonly email?: string;\n readonly name?: string;\n readonly tenant?: string;\n readonly roles?: readonly string[];\n };\n readonly context?: Readonly<Record<string, string | number | boolean | null>>;\n /** Backend-verified user preferences; these outrank untrusted browser presentation hints. */\n readonly preferences?: {\n readonly locale?: string;\n readonly timeZone?: string;\n };\n /**\n * Verified session claims from your authenticated backend. Only claims the server declares in\n * `embeddedAssistant({ sessionClaims })` reach tools (`\\${user.claims.<key>}`) and, when marked\n * `exposeToModel`, the assistant's identity context. Flat scalars only.\n */\n readonly claims?: Readonly<Record<string, string | number | boolean | null>>;\n}\n\nexport interface AssistantSession {\n readonly token: string;\n readonly expiresAt: string;\n readonly endpoints: {\n readonly turns: string;\n readonly toolConfirmations: string;\n readonly interactions?: string;\n };\n readonly configuration?: AssistantConfiguration;\n}\n\nexport async function createAssistantSession(\n input: CreateAssistantSessionInput,\n dependencies: { readonly fetch?: typeof fetch } = {},\n): Promise<AssistantSession> {\n const request = dependencies.fetch ?? fetch;\n const serviceUrl = input.serviceUrl.replace(/\\/$/, '');\n const credentials = Buffer.from(`${input.clientId}:${input.clientSecret}`, 'utf8').toString(\n 'base64',\n );\n const response = await request(`${serviceUrl}/v1/assistant/sessions`, {\n method: 'POST',\n headers: {\n Authorization: `Basic ${credentials}`,\n Accept: 'application/json',\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n origin: input.origin,\n user: input.user,\n ...(input.claims ? { claims: input.claims } : {}),\n ...(input.context ? { context: input.context } : {}),\n ...(input.preferences ? { preferences: input.preferences } : {}),\n }),\n });\n if (!response.ok) throw new Error(`Assistant session exchange failed (${response.status})`);\n return (await response.json()) as AssistantSession;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAwCA,eAAsB,uBACpB,OACA,eAAkD,CAAC,GACxB;AAC3B,QAAM,UAAU,aAAa,SAAS;AACtC,QAAM,aAAa,MAAM,WAAW,QAAQ,OAAO,EAAE;AACrD,QAAM,cAAc,OAAO,KAAK,GAAG,MAAM,QAAQ,IAAI,MAAM,YAAY,IAAI,MAAM,EAAE;AAAA,IACjF;AAAA,EACF;AACA,QAAM,WAAW,MAAM,QAAQ,GAAG,UAAU,0BAA0B;AAAA,IACpE,QAAQ;AAAA,IACR,SAAS;AAAA,MACP,eAAe,SAAS,WAAW;AAAA,MACnC,QAAQ;AAAA,MACR,gBAAgB;AAAA,IAClB;AAAA,IACA,MAAM,KAAK,UAAU;AAAA,MACnB,QAAQ,MAAM;AAAA,MACd,MAAM,MAAM;AAAA,MACZ,GAAI,MAAM,SAAS,EAAE,QAAQ,MAAM,OAAO,IAAI,CAAC;AAAA,MAC/C,GAAI,MAAM,UAAU,EAAE,SAAS,MAAM,QAAQ,IAAI,CAAC;AAAA,MAClD,GAAI,MAAM,cAAc,EAAE,aAAa,MAAM,YAAY,IAAI,CAAC;AAAA,IAChE,CAAC;AAAA,EACH,CAAC;AACD,MAAI,CAAC,SAAS,GAAI,OAAM,IAAI,MAAM,sCAAsC,SAAS,MAAM,GAAG;AAC1F,SAAQ,MAAM,SAAS,KAAK;AAC9B;","names":[]}
1
+ {"version":3,"sources":["../src/server.ts"],"sourcesContent":["import type { AssistantConfiguration } from './appearance.js';\n\nexport interface CreateAssistantSessionInput {\n readonly serviceUrl: string;\n readonly clientId: string;\n readonly clientSecret: string;\n /** Browser origin to bind into the short-lived assistant session. */\n readonly origin: string;\n readonly user: {\n readonly id: string;\n readonly email?: string;\n readonly name?: string;\n readonly tenant?: string;\n readonly roles?: readonly string[];\n };\n readonly context?: Readonly<Record<string, string | number | boolean | null>>;\n /** Backend-verified user preferences; these outrank untrusted browser presentation hints. */\n readonly preferences?: {\n readonly locale?: string;\n readonly timeZone?: string;\n };\n /**\n * Verified session claims from your authenticated backend. Only claims the server declares in\n * `embeddedAssistant({ sessionClaims })` reach tools (`\\${user.claims.<key>}`) and, when marked\n * `exposeToModel`, the assistant's identity context. Flat scalars only.\n */\n readonly claims?: Readonly<Record<string, string | number | boolean | null>>;\n}\n\nexport interface AssistantSession {\n readonly token: string;\n readonly expiresAt: string;\n readonly endpoints: {\n readonly turns: string;\n readonly toolConfirmations: string;\n readonly interactions?: string;\n readonly apps?: string;\n /** Additive hosted sandbox document for widget frames; absent on older services. */\n readonly sandbox?: string;\n };\n readonly configuration?: AssistantConfiguration;\n}\n\nexport async function createAssistantSession(\n input: CreateAssistantSessionInput,\n dependencies: { readonly fetch?: typeof fetch } = {},\n): Promise<AssistantSession> {\n const request = dependencies.fetch ?? fetch;\n const serviceUrl = input.serviceUrl.replace(/\\/$/, '');\n const credentials = Buffer.from(`${input.clientId}:${input.clientSecret}`, 'utf8').toString(\n 'base64',\n );\n const response = await request(`${serviceUrl}/v1/assistant/sessions`, {\n method: 'POST',\n headers: {\n Authorization: `Basic ${credentials}`,\n Accept: 'application/json',\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n origin: input.origin,\n user: input.user,\n ...(input.claims ? { claims: input.claims } : {}),\n ...(input.context ? { context: input.context } : {}),\n ...(input.preferences ? { preferences: input.preferences } : {}),\n }),\n });\n if (!response.ok) throw new Error(`Assistant session exchange failed (${response.status})`);\n return (await response.json()) as AssistantSession;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AA2CA,eAAsB,uBACpB,OACA,eAAkD,CAAC,GACxB;AAC3B,QAAM,UAAU,aAAa,SAAS;AACtC,QAAM,aAAa,MAAM,WAAW,QAAQ,OAAO,EAAE;AACrD,QAAM,cAAc,OAAO,KAAK,GAAG,MAAM,QAAQ,IAAI,MAAM,YAAY,IAAI,MAAM,EAAE;AAAA,IACjF;AAAA,EACF;AACA,QAAM,WAAW,MAAM,QAAQ,GAAG,UAAU,0BAA0B;AAAA,IACpE,QAAQ;AAAA,IACR,SAAS;AAAA,MACP,eAAe,SAAS,WAAW;AAAA,MACnC,QAAQ;AAAA,MACR,gBAAgB;AAAA,IAClB;AAAA,IACA,MAAM,KAAK,UAAU;AAAA,MACnB,QAAQ,MAAM;AAAA,MACd,MAAM,MAAM;AAAA,MACZ,GAAI,MAAM,SAAS,EAAE,QAAQ,MAAM,OAAO,IAAI,CAAC;AAAA,MAC/C,GAAI,MAAM,UAAU,EAAE,SAAS,MAAM,QAAQ,IAAI,CAAC;AAAA,MAClD,GAAI,MAAM,cAAc,EAAE,aAAa,MAAM,YAAY,IAAI,CAAC;AAAA,IAChE,CAAC;AAAA,EACH,CAAC;AACD,MAAI,CAAC,SAAS,GAAI,OAAM,IAAI,MAAM,sCAAsC,SAAS,MAAM,GAAG;AAC1F,SAAQ,MAAM,SAAS,KAAK;AAC9B;","names":[]}
package/dist/server.d.cts CHANGED
@@ -33,6 +33,9 @@ interface AssistantSession {
33
33
  readonly turns: string;
34
34
  readonly toolConfirmations: string;
35
35
  readonly interactions?: string;
36
+ readonly apps?: string;
37
+ /** Additive hosted sandbox document for widget frames; absent on older services. */
38
+ readonly sandbox?: string;
36
39
  };
37
40
  readonly configuration?: AssistantConfiguration;
38
41
  }
package/dist/server.d.ts CHANGED
@@ -33,6 +33,9 @@ interface AssistantSession {
33
33
  readonly turns: string;
34
34
  readonly toolConfirmations: string;
35
35
  readonly interactions?: string;
36
+ readonly apps?: string;
37
+ /** Additive hosted sandbox document for widget frames; absent on older services. */
38
+ readonly sandbox?: string;
36
39
  };
37
40
  readonly configuration?: AssistantConfiguration;
38
41
  }
package/dist/server.js CHANGED
@@ -1,4 +1,4 @@
1
- import "./chunk-NSBPE2FW.js";
1
+ import "./chunk-5FUTL2UF.js";
2
2
 
3
3
  // src/server.ts
4
4
  async function createAssistantSession(input, dependencies = {}) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/server.ts"],"sourcesContent":["import type { AssistantConfiguration } from './appearance.js';\n\nexport interface CreateAssistantSessionInput {\n readonly serviceUrl: string;\n readonly clientId: string;\n readonly clientSecret: string;\n /** Browser origin to bind into the short-lived assistant session. */\n readonly origin: string;\n readonly user: {\n readonly id: string;\n readonly email?: string;\n readonly name?: string;\n readonly tenant?: string;\n readonly roles?: readonly string[];\n };\n readonly context?: Readonly<Record<string, string | number | boolean | null>>;\n /** Backend-verified user preferences; these outrank untrusted browser presentation hints. */\n readonly preferences?: {\n readonly locale?: string;\n readonly timeZone?: string;\n };\n /**\n * Verified session claims from your authenticated backend. Only claims the server declares in\n * `embeddedAssistant({ sessionClaims })` reach tools (`\\${user.claims.<key>}`) and, when marked\n * `exposeToModel`, the assistant's identity context. Flat scalars only.\n */\n readonly claims?: Readonly<Record<string, string | number | boolean | null>>;\n}\n\nexport interface AssistantSession {\n readonly token: string;\n readonly expiresAt: string;\n readonly endpoints: {\n readonly turns: string;\n readonly toolConfirmations: string;\n readonly interactions?: string;\n };\n readonly configuration?: AssistantConfiguration;\n}\n\nexport async function createAssistantSession(\n input: CreateAssistantSessionInput,\n dependencies: { readonly fetch?: typeof fetch } = {},\n): Promise<AssistantSession> {\n const request = dependencies.fetch ?? fetch;\n const serviceUrl = input.serviceUrl.replace(/\\/$/, '');\n const credentials = Buffer.from(`${input.clientId}:${input.clientSecret}`, 'utf8').toString(\n 'base64',\n );\n const response = await request(`${serviceUrl}/v1/assistant/sessions`, {\n method: 'POST',\n headers: {\n Authorization: `Basic ${credentials}`,\n Accept: 'application/json',\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n origin: input.origin,\n user: input.user,\n ...(input.claims ? { claims: input.claims } : {}),\n ...(input.context ? { context: input.context } : {}),\n ...(input.preferences ? { preferences: input.preferences } : {}),\n }),\n });\n if (!response.ok) throw new Error(`Assistant session exchange failed (${response.status})`);\n return (await response.json()) as AssistantSession;\n}\n"],"mappings":";;;AAwCA,eAAsB,uBACpB,OACA,eAAkD,CAAC,GACxB;AAC3B,QAAM,UAAU,aAAa,SAAS;AACtC,QAAM,aAAa,MAAM,WAAW,QAAQ,OAAO,EAAE;AACrD,QAAM,cAAc,OAAO,KAAK,GAAG,MAAM,QAAQ,IAAI,MAAM,YAAY,IAAI,MAAM,EAAE;AAAA,IACjF;AAAA,EACF;AACA,QAAM,WAAW,MAAM,QAAQ,GAAG,UAAU,0BAA0B;AAAA,IACpE,QAAQ;AAAA,IACR,SAAS;AAAA,MACP,eAAe,SAAS,WAAW;AAAA,MACnC,QAAQ;AAAA,MACR,gBAAgB;AAAA,IAClB;AAAA,IACA,MAAM,KAAK,UAAU;AAAA,MACnB,QAAQ,MAAM;AAAA,MACd,MAAM,MAAM;AAAA,MACZ,GAAI,MAAM,SAAS,EAAE,QAAQ,MAAM,OAAO,IAAI,CAAC;AAAA,MAC/C,GAAI,MAAM,UAAU,EAAE,SAAS,MAAM,QAAQ,IAAI,CAAC;AAAA,MAClD,GAAI,MAAM,cAAc,EAAE,aAAa,MAAM,YAAY,IAAI,CAAC;AAAA,IAChE,CAAC;AAAA,EACH,CAAC;AACD,MAAI,CAAC,SAAS,GAAI,OAAM,IAAI,MAAM,sCAAsC,SAAS,MAAM,GAAG;AAC1F,SAAQ,MAAM,SAAS,KAAK;AAC9B;","names":[]}
1
+ {"version":3,"sources":["../src/server.ts"],"sourcesContent":["import type { AssistantConfiguration } from './appearance.js';\n\nexport interface CreateAssistantSessionInput {\n readonly serviceUrl: string;\n readonly clientId: string;\n readonly clientSecret: string;\n /** Browser origin to bind into the short-lived assistant session. */\n readonly origin: string;\n readonly user: {\n readonly id: string;\n readonly email?: string;\n readonly name?: string;\n readonly tenant?: string;\n readonly roles?: readonly string[];\n };\n readonly context?: Readonly<Record<string, string | number | boolean | null>>;\n /** Backend-verified user preferences; these outrank untrusted browser presentation hints. */\n readonly preferences?: {\n readonly locale?: string;\n readonly timeZone?: string;\n };\n /**\n * Verified session claims from your authenticated backend. Only claims the server declares in\n * `embeddedAssistant({ sessionClaims })` reach tools (`\\${user.claims.<key>}`) and, when marked\n * `exposeToModel`, the assistant's identity context. Flat scalars only.\n */\n readonly claims?: Readonly<Record<string, string | number | boolean | null>>;\n}\n\nexport interface AssistantSession {\n readonly token: string;\n readonly expiresAt: string;\n readonly endpoints: {\n readonly turns: string;\n readonly toolConfirmations: string;\n readonly interactions?: string;\n readonly apps?: string;\n /** Additive hosted sandbox document for widget frames; absent on older services. */\n readonly sandbox?: string;\n };\n readonly configuration?: AssistantConfiguration;\n}\n\nexport async function createAssistantSession(\n input: CreateAssistantSessionInput,\n dependencies: { readonly fetch?: typeof fetch } = {},\n): Promise<AssistantSession> {\n const request = dependencies.fetch ?? fetch;\n const serviceUrl = input.serviceUrl.replace(/\\/$/, '');\n const credentials = Buffer.from(`${input.clientId}:${input.clientSecret}`, 'utf8').toString(\n 'base64',\n );\n const response = await request(`${serviceUrl}/v1/assistant/sessions`, {\n method: 'POST',\n headers: {\n Authorization: `Basic ${credentials}`,\n Accept: 'application/json',\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n origin: input.origin,\n user: input.user,\n ...(input.claims ? { claims: input.claims } : {}),\n ...(input.context ? { context: input.context } : {}),\n ...(input.preferences ? { preferences: input.preferences } : {}),\n }),\n });\n if (!response.ok) throw new Error(`Assistant session exchange failed (${response.status})`);\n return (await response.json()) as AssistantSession;\n}\n"],"mappings":";;;AA2CA,eAAsB,uBACpB,OACA,eAAkD,CAAC,GACxB;AAC3B,QAAM,UAAU,aAAa,SAAS;AACtC,QAAM,aAAa,MAAM,WAAW,QAAQ,OAAO,EAAE;AACrD,QAAM,cAAc,OAAO,KAAK,GAAG,MAAM,QAAQ,IAAI,MAAM,YAAY,IAAI,MAAM,EAAE;AAAA,IACjF;AAAA,EACF;AACA,QAAM,WAAW,MAAM,QAAQ,GAAG,UAAU,0BAA0B;AAAA,IACpE,QAAQ;AAAA,IACR,SAAS;AAAA,MACP,eAAe,SAAS,WAAW;AAAA,MACnC,QAAQ;AAAA,MACR,gBAAgB;AAAA,IAClB;AAAA,IACA,MAAM,KAAK,UAAU;AAAA,MACnB,QAAQ,MAAM;AAAA,MACd,MAAM,MAAM;AAAA,MACZ,GAAI,MAAM,SAAS,EAAE,QAAQ,MAAM,OAAO,IAAI,CAAC;AAAA,MAC/C,GAAI,MAAM,UAAU,EAAE,SAAS,MAAM,QAAQ,IAAI,CAAC;AAAA,MAClD,GAAI,MAAM,cAAc,EAAE,aAAa,MAAM,YAAY,IAAI,CAAC;AAAA,IAChE,CAAC;AAAA,EACH,CAAC;AACD,MAAI,CAAC,SAAS,GAAI,OAAM,IAAI,MAAM,sCAAsC,SAAS,MAAM,GAAG;AAC1F,SAAQ,MAAM,SAAS,KAAK;AAC9B;","names":[]}
@@ -0,0 +1,70 @@
1
+ import {
2
+ require_token_error,
3
+ require_token_util
4
+ } from "./chunk-BLMJHF7U.js";
5
+ import {
6
+ __commonJS
7
+ } from "./chunk-5FUTL2UF.js";
8
+
9
+ // ../../node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/token.js
10
+ var require_token = __commonJS({
11
+ "../../node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/token.js"(exports, module) {
12
+ var __defProp = Object.defineProperty;
13
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
14
+ var __getOwnPropNames = Object.getOwnPropertyNames;
15
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
16
+ var __export = (target, all) => {
17
+ for (var name in all)
18
+ __defProp(target, name, { get: all[name], enumerable: true });
19
+ };
20
+ var __copyProps = (to, from, except, desc) => {
21
+ if (from && typeof from === "object" || typeof from === "function") {
22
+ for (let key of __getOwnPropNames(from))
23
+ if (!__hasOwnProp.call(to, key) && key !== except)
24
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
25
+ }
26
+ return to;
27
+ };
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var token_exports = {};
30
+ __export(token_exports, {
31
+ refreshToken: () => refreshToken
32
+ });
33
+ module.exports = __toCommonJS(token_exports);
34
+ var import_token_error = require_token_error();
35
+ var import_token_util = require_token_util();
36
+ async function refreshToken(options) {
37
+ let projectId = options?.project;
38
+ let teamId = options?.team;
39
+ if (!projectId && !teamId) {
40
+ const projectInfo = (0, import_token_util.findProjectInfo)();
41
+ projectId = projectInfo.projectId;
42
+ teamId = projectInfo.teamId;
43
+ } else if (!projectId || !teamId) {
44
+ const projectInfo = (0, import_token_util.findProjectInfo)();
45
+ projectId = projectId ?? projectInfo.projectId;
46
+ teamId = teamId ?? projectInfo.teamId;
47
+ }
48
+ if (!projectId) {
49
+ throw new import_token_error.VercelOidcTokenError(
50
+ "Failed to refresh OIDC token: No project specified. Try re-linking your project with `vc link`"
51
+ );
52
+ }
53
+ let maybeToken = (0, import_token_util.loadToken)(projectId);
54
+ if (!maybeToken || (0, import_token_util.isExpired)((0, import_token_util.getTokenPayload)(maybeToken.token), options?.expirationBufferMs)) {
55
+ const authToken = await (0, import_token_util.getVercelToken)({
56
+ expirationBufferMs: options?.expirationBufferMs
57
+ });
58
+ maybeToken = await (0, import_token_util.getVercelOidcToken)(authToken, projectId, teamId);
59
+ if (!maybeToken) {
60
+ throw new import_token_error.VercelOidcTokenError("Failed to refresh OIDC token");
61
+ }
62
+ (0, import_token_util.saveToken)(maybeToken, projectId);
63
+ }
64
+ process.env.VERCEL_OIDC_TOKEN = maybeToken.token;
65
+ return;
66
+ }
67
+ }
68
+ });
69
+ export default require_token();
70
+ //# sourceMappingURL=token-Y6KCR3JT.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../node_modules/.pnpm/@vercel+oidc@3.2.0/node_modules/@vercel/oidc/dist/token.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar token_exports = {};\n__export(token_exports, {\n refreshToken: () => refreshToken\n});\nmodule.exports = __toCommonJS(token_exports);\nvar import_token_error = require(\"./token-error\");\nvar import_token_util = require(\"./token-util\");\nasync function refreshToken(options) {\n let projectId = options?.project;\n let teamId = options?.team;\n if (!projectId && !teamId) {\n const projectInfo = (0, import_token_util.findProjectInfo)();\n projectId = projectInfo.projectId;\n teamId = projectInfo.teamId;\n } else if (!projectId || !teamId) {\n const projectInfo = (0, import_token_util.findProjectInfo)();\n projectId = projectId ?? projectInfo.projectId;\n teamId = teamId ?? projectInfo.teamId;\n }\n if (!projectId) {\n throw new import_token_error.VercelOidcTokenError(\n \"Failed to refresh OIDC token: No project specified. Try re-linking your project with `vc link`\"\n );\n }\n let maybeToken = (0, import_token_util.loadToken)(projectId);\n if (!maybeToken || (0, import_token_util.isExpired)((0, import_token_util.getTokenPayload)(maybeToken.token), options?.expirationBufferMs)) {\n const authToken = await (0, import_token_util.getVercelToken)({\n expirationBufferMs: options?.expirationBufferMs\n });\n maybeToken = await (0, import_token_util.getVercelOidcToken)(authToken, projectId, teamId);\n if (!maybeToken) {\n throw new import_token_error.VercelOidcTokenError(\"Failed to refresh OIDC token\");\n }\n (0, import_token_util.saveToken)(maybeToken, projectId);\n }\n process.env.VERCEL_OIDC_TOKEN = maybeToken.token;\n return;\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n refreshToken\n});\n"],"mappings":";;;;;;;;;AAAA;AAAA;AACA,QAAI,YAAY,OAAO;AACvB,QAAI,mBAAmB,OAAO;AAC9B,QAAI,oBAAoB,OAAO;AAC/B,QAAI,eAAe,OAAO,UAAU;AACpC,QAAI,WAAW,CAAC,QAAQ,QAAQ;AAC9B,eAAS,QAAQ;AACf,kBAAU,QAAQ,MAAM,EAAE,KAAK,IAAI,IAAI,GAAG,YAAY,KAAK,CAAC;AAAA,IAChE;AACA,QAAI,cAAc,CAAC,IAAI,MAAM,QAAQ,SAAS;AAC5C,UAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;AAClE,iBAAS,OAAO,kBAAkB,IAAI;AACpC,cAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ;AACzC,sBAAU,IAAI,KAAK,EAAE,KAAK,MAAM,KAAK,GAAG,GAAG,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK,WAAW,CAAC;AAAA,MACvH;AACA,aAAO;AAAA,IACT;AACA,QAAI,eAAe,CAAC,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,QAAI,gBAAgB,CAAC;AACrB,aAAS,eAAe;AAAA,MACtB,cAAc,MAAM;AAAA,IACtB,CAAC;AACD,WAAO,UAAU,aAAa,aAAa;AAC3C,QAAI,qBAAqB;AACzB,QAAI,oBAAoB;AACxB,mBAAe,aAAa,SAAS;AACnC,UAAI,YAAY,SAAS;AACzB,UAAI,SAAS,SAAS;AACtB,UAAI,CAAC,aAAa,CAAC,QAAQ;AACzB,cAAM,eAAe,GAAG,kBAAkB,iBAAiB;AAC3D,oBAAY,YAAY;AACxB,iBAAS,YAAY;AAAA,MACvB,WAAW,CAAC,aAAa,CAAC,QAAQ;AAChC,cAAM,eAAe,GAAG,kBAAkB,iBAAiB;AAC3D,oBAAY,aAAa,YAAY;AACrC,iBAAS,UAAU,YAAY;AAAA,MACjC;AACA,UAAI,CAAC,WAAW;AACd,cAAM,IAAI,mBAAmB;AAAA,UAC3B;AAAA,QACF;AAAA,MACF;AACA,UAAI,cAAc,GAAG,kBAAkB,WAAW,SAAS;AAC3D,UAAI,CAAC,eAAe,GAAG,kBAAkB,YAAY,GAAG,kBAAkB,iBAAiB,WAAW,KAAK,GAAG,SAAS,kBAAkB,GAAG;AAC1I,cAAM,YAAY,OAAO,GAAG,kBAAkB,gBAAgB;AAAA,UAC5D,oBAAoB,SAAS;AAAA,QAC/B,CAAC;AACD,qBAAa,OAAO,GAAG,kBAAkB,oBAAoB,WAAW,WAAW,MAAM;AACzF,YAAI,CAAC,YAAY;AACf,gBAAM,IAAI,mBAAmB,qBAAqB,8BAA8B;AAAA,QAClF;AACA,SAAC,GAAG,kBAAkB,WAAW,YAAY,SAAS;AAAA,MACxD;AACA,cAAQ,IAAI,oBAAoB,WAAW;AAC3C;AAAA,IACF;AAAA;AAAA;","names":[]}
@@ -0,0 +1,6 @@
1
+ import {
2
+ require_token_util
3
+ } from "./chunk-BLMJHF7U.js";
4
+ import "./chunk-5FUTL2UF.js";
5
+ export default require_token_util();
6
+ //# sourceMappingURL=token-util-XFYMRPAB.js.map
@@ -238,8 +238,8 @@ import {
238
238
  v4_default,
239
239
  xid,
240
240
  xor
241
- } from "./chunk-UXPKSCID.js";
242
- import "./chunk-NSBPE2FW.js";
241
+ } from "./chunk-3YYTUJPJ.js";
242
+ import "./chunk-5FUTL2UF.js";
243
243
  export {
244
244
  $brand,
245
245
  $input,
@@ -482,4 +482,4 @@ export {
482
482
  xor,
483
483
  external_exports as z
484
484
  };
485
- //# sourceMappingURL=v4-2UXPDMWJ.js.map
485
+ //# sourceMappingURL=v4-KBRL3YLO.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@noodleseed/assistant",
3
- "version": "1.6.0",
4
- "description": "Embed the Noodle Seed customer-branded assistant in your web app: Web Component, React wrapper, and backend session helper. Authoring and deploying the server is @noodleseed/one.",
3
+ "version": "1.8.0",
4
+ "description": "Embed the Noodle Seed customer-branded assistant in your web app with a Web Component, managed or custom React UI, DOM-free client, and backend session helper. Authoring and deploying the server is @noodleseed/one.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -33,6 +33,12 @@
33
33
  "require": "./dist/react.cjs",
34
34
  "default": "./dist/react.js"
35
35
  },
36
+ "./react/client": {
37
+ "types": "./dist/react/client.d.ts",
38
+ "import": "./dist/react/client.js",
39
+ "require": "./dist/react/client.cjs",
40
+ "default": "./dist/react/client.js"
41
+ },
36
42
  "./server": {
37
43
  "types": "./dist/server.d.ts",
38
44
  "import": "./dist/server.js",
@@ -74,6 +80,9 @@
74
80
  "react": [
75
81
  "./dist/react.d.ts"
76
82
  ],
83
+ "react/client": [
84
+ "./dist/react/client.d.ts"
85
+ ],
77
86
  "client": [
78
87
  "./dist/client.d.ts"
79
88
  ],
@@ -84,7 +93,9 @@
84
93
  },
85
94
  "dependencies": {
86
95
  "@modelcontextprotocol/ext-apps": "^1.7.4",
96
+ "ai": "6.0.201",
87
97
  "dompurify": "^3.4.11",
88
- "marked": "^16.4.2"
98
+ "marked": "^16.4.2",
99
+ "zod": "^4.4.3"
89
100
  }
90
101
  }