@runtypelabs/persona 3.22.0 → 3.24.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -2778,6 +2778,14 @@ type ClientChatRequest = {
2778
2778
  context?: Record<string, unknown>;
2779
2779
  /** WebMCP page-discovered tools — same shape as `dispatch.clientTools[]`. */
2780
2780
  clientTools?: ClientToolDefinition[];
2781
+ /**
2782
+ * Diff-only / send-once: order-independent fingerprint of the client tool set.
2783
+ * When the set is unchanged from the previous turn the widget sends this
2784
+ * WITHOUT `clientTools` and the server reuses its stored set. On a cache miss
2785
+ * the server replies `409 { error: 'client_tools_resend_required' }` and the
2786
+ * widget retries once with the full `clientTools[]`.
2787
+ */
2788
+ clientToolsFingerprint?: string;
2781
2789
  };
2782
2790
  /**
2783
2791
  * Feedback types supported by the API
@@ -4628,6 +4636,8 @@ declare class AgentWidgetClient {
4628
4636
  private onSSEEvent?;
4629
4637
  private clientSession;
4630
4638
  private sessionInitPromise;
4639
+ private lastSentClientToolsFingerprint;
4640
+ private clientToolsFingerprintSessionId;
4631
4641
  private readonly webMcpBridge;
4632
4642
  constructor(config?: AgentWidgetConfig);
4633
4643
  /**
@@ -4688,6 +4698,12 @@ declare class AgentWidgetClient {
4688
4698
  * Clear the current client session
4689
4699
  */
4690
4700
  clearClientSession(): void;
4701
+ /**
4702
+ * Forget the diff-only WebMCP tool fingerprint so the next client-token turn
4703
+ * resends the full `clientTools[]`. Called when the session is cleared and
4704
+ * when the conversation is reset (`WidgetSession.clearMessages`).
4705
+ */
4706
+ resetClientToolsFingerprint(): void;
4691
4707
  /**
4692
4708
  * Get the feedback API URL
4693
4709
  */
package/dist/index.d.ts CHANGED
@@ -2778,6 +2778,14 @@ type ClientChatRequest = {
2778
2778
  context?: Record<string, unknown>;
2779
2779
  /** WebMCP page-discovered tools — same shape as `dispatch.clientTools[]`. */
2780
2780
  clientTools?: ClientToolDefinition[];
2781
+ /**
2782
+ * Diff-only / send-once: order-independent fingerprint of the client tool set.
2783
+ * When the set is unchanged from the previous turn the widget sends this
2784
+ * WITHOUT `clientTools` and the server reuses its stored set. On a cache miss
2785
+ * the server replies `409 { error: 'client_tools_resend_required' }` and the
2786
+ * widget retries once with the full `clientTools[]`.
2787
+ */
2788
+ clientToolsFingerprint?: string;
2781
2789
  };
2782
2790
  /**
2783
2791
  * Feedback types supported by the API
@@ -4628,6 +4636,8 @@ declare class AgentWidgetClient {
4628
4636
  private onSSEEvent?;
4629
4637
  private clientSession;
4630
4638
  private sessionInitPromise;
4639
+ private lastSentClientToolsFingerprint;
4640
+ private clientToolsFingerprintSessionId;
4631
4641
  private readonly webMcpBridge;
4632
4642
  constructor(config?: AgentWidgetConfig);
4633
4643
  /**
@@ -4688,6 +4698,12 @@ declare class AgentWidgetClient {
4688
4698
  * Clear the current client session
4689
4699
  */
4690
4700
  clearClientSession(): void;
4701
+ /**
4702
+ * Forget the diff-only WebMCP tool fingerprint so the next client-token turn
4703
+ * resends the full `clientTools[]`. Called when the session is cleared and
4704
+ * when the conversation is reset (`WidgetSession.clearMessages`).
4705
+ */
4706
+ resetClientToolsFingerprint(): void;
4691
4707
  /**
4692
4708
  * Get the feedback API URL
4693
4709
  */