@noodleseed/assistant 1.15.0 → 1.16.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.
@@ -57,6 +57,17 @@ interface AssistantToolProposedDetail extends TurnDetail {
57
57
  /** Optional only for compatibility with assistant services published before named-event pinning. */
58
58
  readonly requiresConfirmation?: true;
59
59
  }
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.
64
+ */
65
+ interface AssistantAuthRequestedDetail extends TurnDetail {
66
+ readonly id: string;
67
+ readonly tool: string;
68
+ readonly continuation: string;
69
+ readonly expiresAt: string;
70
+ }
60
71
  interface AssistantInputRequestedDetail extends TurnDetail {
61
72
  readonly id: string;
62
73
  readonly message: string;
@@ -98,6 +109,7 @@ type AssistantContentEvent = NamedEvent<'content', AssistantContentDetail>;
98
109
  type AssistantToolStartedEvent = NamedEvent<'tool_started', AssistantToolStartedDetail>;
99
110
  type AssistantToolProposedEvent = NamedEvent<'tool_proposed', AssistantToolProposedDetail>;
100
111
  type AssistantInputRequestedEvent = NamedEvent<'input_requested', AssistantInputRequestedDetail>;
112
+ type AssistantAuthRequestedEvent = NamedEvent<'auth_requested', AssistantAuthRequestedDetail>;
101
113
  type AssistantInteractionResolvedEvent = NamedEvent<'interaction_resolved', AssistantInteractionResolvedDetail>;
102
114
  type AssistantToolCompletedEvent = NamedEvent<'tool_completed', AssistantToolCompletedDetail>;
103
115
  type AssistantViewAvailableEvent = NamedEvent<'view_available', AssistantViewAvailableDetail>;
@@ -134,7 +146,7 @@ interface AssistantUnrecognizedEvent {
134
146
  };
135
147
  }
136
148
  /** Closed event union for the DOM-free client; unknown future SSE names remain observable safely. */
137
- type AssistantClientEvent = AssistantContentEvent | AssistantToolStartedEvent | AssistantToolProposedEvent | AssistantInputRequestedEvent | AssistantInteractionResolvedEvent | AssistantToolCompletedEvent | AssistantViewAvailableEvent | AssistantErrorEvent | AssistantDoneEvent | NamedEvent<'interaction_proposed', AssistantLegacyInteractionProposedDetail> | AssistantClientLifecycleEvent | AssistantUnrecognizedEvent;
149
+ type AssistantClientEvent = AssistantContentEvent | AssistantToolStartedEvent | AssistantToolProposedEvent | AssistantInputRequestedEvent | AssistantAuthRequestedEvent | AssistantInteractionResolvedEvent | AssistantToolCompletedEvent | AssistantViewAvailableEvent | AssistantErrorEvent | AssistantDoneEvent | NamedEvent<'interaction_proposed', AssistantLegacyInteractionProposedDetail> | AssistantClientLifecycleEvent | AssistantUnrecognizedEvent;
138
150
 
139
151
  type AssistantInteractionStatus = 'pending' | 'submitting' | 'accepted' | 'declined' | 'cancelled';
140
152
  interface AssistantConfirmationData {
@@ -57,6 +57,17 @@ interface AssistantToolProposedDetail extends TurnDetail {
57
57
  /** Optional only for compatibility with assistant services published before named-event pinning. */
58
58
  readonly requiresConfirmation?: true;
59
59
  }
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.
64
+ */
65
+ interface AssistantAuthRequestedDetail extends TurnDetail {
66
+ readonly id: string;
67
+ readonly tool: string;
68
+ readonly continuation: string;
69
+ readonly expiresAt: string;
70
+ }
60
71
  interface AssistantInputRequestedDetail extends TurnDetail {
61
72
  readonly id: string;
62
73
  readonly message: string;
@@ -98,6 +109,7 @@ type AssistantContentEvent = NamedEvent<'content', AssistantContentDetail>;
98
109
  type AssistantToolStartedEvent = NamedEvent<'tool_started', AssistantToolStartedDetail>;
99
110
  type AssistantToolProposedEvent = NamedEvent<'tool_proposed', AssistantToolProposedDetail>;
100
111
  type AssistantInputRequestedEvent = NamedEvent<'input_requested', AssistantInputRequestedDetail>;
112
+ type AssistantAuthRequestedEvent = NamedEvent<'auth_requested', AssistantAuthRequestedDetail>;
101
113
  type AssistantInteractionResolvedEvent = NamedEvent<'interaction_resolved', AssistantInteractionResolvedDetail>;
102
114
  type AssistantToolCompletedEvent = NamedEvent<'tool_completed', AssistantToolCompletedDetail>;
103
115
  type AssistantViewAvailableEvent = NamedEvent<'view_available', AssistantViewAvailableDetail>;
@@ -134,7 +146,7 @@ interface AssistantUnrecognizedEvent {
134
146
  };
135
147
  }
136
148
  /** Closed event union for the DOM-free client; unknown future SSE names remain observable safely. */
137
- type AssistantClientEvent = AssistantContentEvent | AssistantToolStartedEvent | AssistantToolProposedEvent | AssistantInputRequestedEvent | AssistantInteractionResolvedEvent | AssistantToolCompletedEvent | AssistantViewAvailableEvent | AssistantErrorEvent | AssistantDoneEvent | NamedEvent<'interaction_proposed', AssistantLegacyInteractionProposedDetail> | AssistantClientLifecycleEvent | AssistantUnrecognizedEvent;
149
+ type AssistantClientEvent = AssistantContentEvent | AssistantToolStartedEvent | AssistantToolProposedEvent | AssistantInputRequestedEvent | AssistantAuthRequestedEvent | AssistantInteractionResolvedEvent | AssistantToolCompletedEvent | AssistantViewAvailableEvent | AssistantErrorEvent | AssistantDoneEvent | NamedEvent<'interaction_proposed', AssistantLegacyInteractionProposedDetail> | AssistantClientLifecycleEvent | AssistantUnrecognizedEvent;
138
150
 
139
151
  type AssistantInteractionStatus = 'pending' | 'submitting' | 'accepted' | 'declined' | 'cancelled';
140
152
  interface AssistantConfirmationData {
package/dist/client.cjs CHANGED
@@ -22918,6 +22918,11 @@ 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;
22924
+ }
22925
+ break;
22921
22926
  case "interaction_resolved":
22922
22927
  if (hasString(value, "id") && (value.action === void 0 || isInteractionAction(value.action)) && hasOptionalTurnId(value)) {
22923
22928
  return event;