@noodleseed/assistant 1.19.0 → 1.20.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.
@@ -58,14 +58,16 @@ interface AssistantToolProposedDetail extends TurnDetail {
58
58
  readonly requiresConfirmation?: true;
59
59
  }
60
60
  /**
61
- * A capability the visitor must sign in to reach (ADR 0201, 5.6b). `continuation` is the value the host
62
- * page hands to its **own** backend, which spends it with its own client credentials; on its own it names
63
- * a conversation and nothing more.
61
+ * A capability the visitor must sign in to reach (ADR 0201, 5.6b). `signInTicket` is the value the host
62
+ * page hands to its **own** backend, which spends it with its own client credentials
63
+ * (`createAssistantSession({ signInTicket })`); on its own it names a conversation and nothing more.
64
+ * It is deliberately not called a continuation: the server-held interaction continuation must never
65
+ * reach browser code, and this value's whole job is to travel through the browser.
64
66
  */
65
67
  interface AssistantAuthRequestedDetail extends TurnDetail {
66
68
  readonly id: string;
67
69
  readonly tool: string;
68
- readonly continuation: string;
70
+ readonly signInTicket: string;
69
71
  readonly expiresAt: string;
70
72
  }
71
73
  interface AssistantInputRequestedDetail extends TurnDetail {
@@ -58,14 +58,16 @@ interface AssistantToolProposedDetail extends TurnDetail {
58
58
  readonly requiresConfirmation?: true;
59
59
  }
60
60
  /**
61
- * A capability the visitor must sign in to reach (ADR 0201, 5.6b). `continuation` is the value the host
62
- * page hands to its **own** backend, which spends it with its own client credentials; on its own it names
63
- * a conversation and nothing more.
61
+ * A capability the visitor must sign in to reach (ADR 0201, 5.6b). `signInTicket` is the value the host
62
+ * page hands to its **own** backend, which spends it with its own client credentials
63
+ * (`createAssistantSession({ signInTicket })`); on its own it names a conversation and nothing more.
64
+ * It is deliberately not called a continuation: the server-held interaction continuation must never
65
+ * reach browser code, and this value's whole job is to travel through the browser.
64
66
  */
65
67
  interface AssistantAuthRequestedDetail extends TurnDetail {
66
68
  readonly id: string;
67
69
  readonly tool: string;
68
- readonly continuation: string;
70
+ readonly signInTicket: string;
69
71
  readonly expiresAt: string;
70
72
  }
71
73
  interface AssistantInputRequestedDetail extends TurnDetail {
package/dist/client.cjs CHANGED
@@ -22918,11 +22918,16 @@ function toAssistantClientEvent(event) {
22918
22918
  return event;
22919
22919
  }
22920
22920
  break;
22921
- case "auth_requested":
22922
- if (hasString(value, "id") && hasString(value, "tool") && hasString(value, "continuation") && hasString(value, "expiresAt") && hasOptionalTurnId(value)) {
22923
- return event;
22921
+ case "auth_requested": {
22922
+ const signInTicket = typeof value.signInTicket === "string" ? value.signInTicket : typeof value.continuation === "string" ? value.continuation : void 0;
22923
+ if (hasString(value, "id") && hasString(value, "tool") && signInTicket !== void 0 && hasString(value, "expiresAt") && hasOptionalTurnId(value)) {
22924
+ return {
22925
+ event: "auth_requested",
22926
+ data: { ...value, signInTicket }
22927
+ };
22924
22928
  }
22925
22929
  break;
22930
+ }
22926
22931
  case "interaction_resolved":
22927
22932
  if (hasString(value, "id") && (value.action === void 0 || isInteractionAction(value.action)) && hasOptionalTurnId(value)) {
22928
22933
  return event;