holostaff-widget 3.0.4 → 3.0.6

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 (25) hide show
  1. package/dist/{CanvasRenderer-DtJMGjQ-.js → CanvasRenderer-CNPW48Qw.js} +5 -5
  2. package/dist/{CanvasRenderer-DtJMGjQ-.js.map → CanvasRenderer-CNPW48Qw.js.map} +1 -1
  3. package/dist/{Filter-BZ0p_cLc.js → Filter-AM8DWlqL.js} +2 -2
  4. package/dist/{Filter-BZ0p_cLc.js.map → Filter-AM8DWlqL.js.map} +1 -1
  5. package/dist/{GpuStencilModesToPixi-BhdxrQzF.js → GpuStencilModesToPixi-BR9JEV9O.js} +3 -3
  6. package/dist/{GpuStencilModesToPixi-BhdxrQzF.js.map → GpuStencilModesToPixi-BR9JEV9O.js.map} +1 -1
  7. package/dist/{RenderTargetSystem-Cbru8Ci0.js → RenderTargetSystem-BpbroGT3.js} +3 -3
  8. package/dist/{RenderTargetSystem-Cbru8Ci0.js.map → RenderTargetSystem-BpbroGT3.js.map} +1 -1
  9. package/dist/{WebGLRenderer--845IaSu.js → WebGLRenderer-C8_IJOQx.js} +5 -5
  10. package/dist/{WebGLRenderer--845IaSu.js.map → WebGLRenderer-C8_IJOQx.js.map} +1 -1
  11. package/dist/{WebGPURenderer-DBDzoMAw.js → WebGPURenderer-C9gHL4Xl.js} +6 -6
  12. package/dist/{WebGPURenderer-DBDzoMAw.js.map → WebGPURenderer-C9gHL4Xl.js.map} +1 -1
  13. package/dist/{browserAll-CIOBMh08.js → browserAll-BHbeidFW.js} +3 -3
  14. package/dist/{browserAll-CIOBMh08.js.map → browserAll-BHbeidFW.js.map} +1 -1
  15. package/dist/{getTextureBatchBindGroup-DCKtteRk.js → getTextureBatchBindGroup-CNV1rYho.js} +3 -3
  16. package/dist/{getTextureBatchBindGroup-DCKtteRk.js.map → getTextureBatchBindGroup-CNV1rYho.js.map} +1 -1
  17. package/dist/hs-widget.es.js +1 -1
  18. package/dist/hs-widget.umd.js +5 -5
  19. package/dist/hs-widget.umd.js.map +1 -1
  20. package/dist/{index-BbQvHSpa.js → index-D4TjHcc0.js} +33 -12
  21. package/dist/index-D4TjHcc0.js.map +1 -0
  22. package/dist/{webworkerAll-EB5JX-2r.js → webworkerAll-Cqn374qg.js} +3 -3
  23. package/dist/{webworkerAll-EB5JX-2r.js.map → webworkerAll-Cqn374qg.js.map} +1 -1
  24. package/package.json +1 -1
  25. package/dist/index-BbQvHSpa.js.map +0 -1
@@ -8140,7 +8140,7 @@ const fc = {
8140
8140
  },
8141
8141
  test: () => !0,
8142
8142
  load: async () => {
8143
- await import("./browserAll-CIOBMh08.js");
8143
+ await import("./browserAll-BHbeidFW.js");
8144
8144
  }
8145
8145
  }, pc = {
8146
8146
  extension: {
@@ -8150,7 +8150,7 @@ const fc = {
8150
8150
  },
8151
8151
  test: () => typeof self < "u" && self.WorkerGlobalScope !== void 0,
8152
8152
  load: async () => {
8153
- await import("./webworkerAll-EB5JX-2r.js");
8153
+ await import("./webworkerAll-Cqn374qg.js");
8154
8154
  }
8155
8155
  };
8156
8156
  function mc(i, e, t) {
@@ -10591,17 +10591,17 @@ async function Nc(i) {
10591
10591
  for (let r = 0; r < e.length; r++) {
10592
10592
  const o = e[r];
10593
10593
  if (o === "webgpu" && await Mc()) {
10594
- const { WebGPURenderer: a } = await import("./WebGPURenderer-DBDzoMAw.js");
10594
+ const { WebGPURenderer: a } = await import("./WebGPURenderer-C9gHL4Xl.js");
10595
10595
  t = a, s = { ...i, ...i.webgpu };
10596
10596
  break;
10597
10597
  } else if (o === "webgl" && kc(
10598
10598
  i.failIfMajorPerformanceCaveat ?? Ys.defaultOptions.failIfMajorPerformanceCaveat
10599
10599
  )) {
10600
- const { WebGLRenderer: a } = await import("./WebGLRenderer--845IaSu.js");
10600
+ const { WebGLRenderer: a } = await import("./WebGLRenderer-C8_IJOQx.js");
10601
10601
  t = a, s = { ...i, ...i.webgl };
10602
10602
  break;
10603
10603
  } else if (o === "canvas") {
10604
- const { CanvasRenderer: a } = await import("./CanvasRenderer-DtJMGjQ-.js");
10604
+ const { CanvasRenderer: a } = await import("./CanvasRenderer-CNPW48Qw.js");
10605
10605
  t = a, s = { ...i, ...i.canvasOptions };
10606
10606
  break;
10607
10607
  }
@@ -10934,7 +10934,7 @@ class Lc {
10934
10934
  zIndex: "2147483646",
10935
10935
  pointerEvents: "none",
10936
10936
  overflow: "visible"
10937
- }), document.body.appendChild(this.container));
10937
+ }), document.documentElement.appendChild(this.container));
10938
10938
  const s = this.app.canvas;
10939
10939
  return Object.assign(s.style, {
10940
10940
  width: "100%",
@@ -14395,7 +14395,7 @@ class Oh {
14395
14395
  const kh = /* @__PURE__ */ new Set(["scroll_to", "click", "highlight"]);
14396
14396
  class Mh {
14397
14397
  constructor(e) {
14398
- this.onToolCall = null, this.fnArgBufs = /* @__PURE__ */ new Map(), this.fnNames = /* @__PURE__ */ new Map(), this.fnCallIds = /* @__PURE__ */ new Map(), this.realtimeSession = e.realtimeSession, this.domAnalyzer = e.domAnalyzer, this.pageActions = e.pageActions, this.overlayActions = e.overlayActions, this.confirmationPrompt = e.confirmationPrompt, this.staffId = e.staffId, this.backendUrl = e.backendUrl;
14398
+ this.onToolCall = null, this.fnArgBufs = /* @__PURE__ */ new Map(), this.fnNames = /* @__PURE__ */ new Map(), this.fnCallIds = /* @__PURE__ */ new Map(), this.realtimeSession = e.realtimeSession, this.domAnalyzer = e.domAnalyzer, this.pageActions = e.pageActions, this.overlayActions = e.overlayActions, this.confirmationPrompt = e.confirmationPrompt, this.staffId = e.staffId, this.backendUrl = e.backendUrl, this.skills = e.skills ?? {};
14399
14399
  }
14400
14400
  /**
14401
14401
  * Handle a data channel message. Returns true if the message was a tool call
@@ -14455,6 +14455,11 @@ class Mh {
14455
14455
  case "dismiss_overlays":
14456
14456
  o = this.overlayActions.dismissAll();
14457
14457
  break;
14458
+ case "get_skill_instructions": {
14459
+ const l = r.skill_name ?? "", h = this.skills[l];
14460
+ h ? (console.log(`[ToolHandler] Serving skill instructions for "${l}" (${h.length} chars)`), o = { instructions: h }) : (console.warn(`[ToolHandler] Skill not found: "${l}". Available: ${Object.keys(this.skills).join(", ")}`), o = { error: `No skill found with name "${l}". Available skills: ${Object.keys(this.skills).join(", ")}` });
14461
+ break;
14462
+ }
14458
14463
  default:
14459
14464
  console.warn(`[ToolHandler] Unknown tool: ${t}`), o = { error: `Unknown tool: ${t}` };
14460
14465
  }
@@ -18786,7 +18791,7 @@ class hr {
18786
18791
  }), this.suggestionArea.appendChild(o), this.el.appendChild(this.suggestionArea), this.el.addEventListener("click", (a) => {
18787
18792
  var l;
18788
18793
  a.target.closest("button") || (l = this.onClick) == null || l.call(this);
18789
- }), document.body.appendChild(this.el);
18794
+ }), document.documentElement.appendChild(this.el);
18790
18795
  }
18791
18796
  // -----------------------------------------------------------------------
18792
18797
  // State transitions
@@ -19326,6 +19331,21 @@ const Ef = 800, If = 600 * 1e3, Af = 540 * 1e3, ur = 60 * 1e3, xf = 90 * 1e3, wf
19326
19331
  name: "dismiss_overlays",
19327
19332
  description: "Dismiss all currently visible overlay cards.",
19328
19333
  parameters: { type: "object", properties: {}, required: [] }
19334
+ },
19335
+ {
19336
+ type: "function",
19337
+ name: "get_skill_instructions",
19338
+ description: 'Retrieve the full playbook for one of your configured skills. Call this when you determine a skill is relevant to the current conversation — it returns detailed guidance on what to say, tone, and what to avoid. Use the skill name exactly as listed in the "Your Skills" section of your instructions.',
19339
+ parameters: {
19340
+ type: "object",
19341
+ properties: {
19342
+ skill_name: {
19343
+ type: "string",
19344
+ description: 'The exact skill name as listed in Your Skills (e.g. "Convert Visitor", "Get Started").'
19345
+ }
19346
+ },
19347
+ required: ["skill_name"]
19348
+ }
19329
19349
  }
19330
19350
  ];
19331
19351
  class Tf {
@@ -19342,10 +19362,10 @@ class Tf {
19342
19362
  return this.config.container;
19343
19363
  }
19344
19364
  async init() {
19345
- Ze(), this.stage = new Lc(), await this.stage.init(this.config.mode, this.config.container), this.avatar = new Fc(this.stage.stageWidth, this.stage.stageHeight), this.stage.app.stage.addChild(this.avatar.container), await this.loadIdleAsset(), this.avatarFrame = new af(), this.stage.rootElement && jt(this.stage.rootElement), this.bubble = new hf(this.widgetPrompts ?? void 0), this.bubble.onClick = () => this.onAvatarClick(), this.stage.rootElement && (this.stage.rootElement.style.position = "relative", this.stage.rootElement.appendChild(this.bubble.el)), this.avatar.setInteractive(() => this.onAvatarClick()), this.isInline && (this.chatPill = new hr(), this.chatPill.init(this.staffAvatarUrl, this.idleVideoUrl, this.staffDisplayName), this.chatPill.onClick = () => this.onAvatarClick(), setTimeout(() => {
19365
+ Ze(), this.stage = new Lc(), await this.stage.init(this.config.mode, this.config.container), this.avatar = new Fc(this.stage.stageWidth, this.stage.stageHeight), this.stage.app.stage.addChild(this.avatar.container), await this.loadIdleAsset(), this.avatarFrame = new af(), this.stage.rootElement && jt(this.stage.rootElement), this.bubble = new hf(this.widgetPrompts ?? void 0), this.bubble.onClick = () => this.onAvatarClick(), this.stage.rootElement && (this.stage.rootElement.style.position = "relative", this.stage.rootElement.appendChild(this.bubble.el)), this.avatar.setInteractive(() => this.onAvatarClick()), this.chatPill = new hr(), this.chatPill.init(this.staffAvatarUrl, this.idleVideoUrl, this.staffDisplayName), this.chatPill.onClick = () => this.onAvatarClick(), this.isInline ? (setTimeout(() => {
19346
19366
  var t;
19347
19367
  (this.state === "idle" || this.state === "teasing") && !this.homeVisible && ((t = this.chatPill) == null ? void 0 : t.state) === "hidden" && this.chatPill.showNamed();
19348
- }, 5e3), this.startHomeObserver()), this.setupTrigger(), this.startVisionLoop(), window.addEventListener("beforeunload", () => {
19368
+ }, 5e3), this.startHomeObserver()) : this.homeVisible = !1, this.setupTrigger(), this.startVisionLoop(), window.addEventListener("beforeunload", () => {
19349
19369
  var e;
19350
19370
  (this.state === "active" || this.state === "connecting") && ((e = this.logger) == null || e.flush());
19351
19371
  }), console.log("[HolostaffWidget] Initialized", {
@@ -19660,7 +19680,8 @@ All actions except form filling require the visitor to confirm before executing.
19660
19680
  overlayActions: new Dh(this.overlayRenderer),
19661
19681
  confirmationPrompt: this.confirmationPrompt,
19662
19682
  staffId: this.config.staffId,
19663
- backendUrl: this.config.backendUrl
19683
+ backendUrl: this.config.backendUrl,
19684
+ skills: this.sessionResponse.skills ?? {}
19664
19685
  }), this.toolHandler.onToolCall = (a, l) => {
19665
19686
  var h;
19666
19687
  (h = this.logger) == null || h.addAction(a, l);
@@ -20039,4 +20060,4 @@ export {
20039
20060
  st as y,
20040
20061
  Gr as z
20041
20062
  };
20042
- //# sourceMappingURL=index-BbQvHSpa.js.map
20063
+ //# sourceMappingURL=index-D4TjHcc0.js.map