@webless/agent 0.7.4 → 0.7.5

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.
@@ -149,6 +149,19 @@ type BookingCanceled = {
149
149
  };
150
150
  type ToolCard = BookingOffer | BookingConfirmed | BookingCanceled | VisitorFormCard;
151
151
 
152
+ type AgentSearchSource = {
153
+ id: string;
154
+ title: string;
155
+ url?: string;
156
+ };
157
+ type AgentSearchReferences = {
158
+ sources: AgentSearchSource[];
159
+ cta?: {
160
+ label: string;
161
+ url?: string;
162
+ };
163
+ };
164
+
152
165
  type VisitorToolResultLink = {
153
166
  label: string;
154
167
  href: string;
@@ -221,7 +234,13 @@ type VisitorHiddenToolResultPresentation = {
221
234
  status: AgentToolResult["status"];
222
235
  kind: "hidden";
223
236
  };
224
- type ResolvedVisitorToolResultPresentation = VisitorToolResultPresentation | VisitorEntityResultPresentation | VisitorCollectionResultPresentation | VisitorSignatureResultPresentation | VisitorBookingResultPresentation | VisitorToolInputResultPresentation | VisitorHiddenToolResultPresentation;
237
+ type VisitorSearchResultPresentation = AgentSearchReferences & {
238
+ id: string;
239
+ toolName: "search_discovery";
240
+ status: "completed";
241
+ kind: "search";
242
+ };
243
+ type ResolvedVisitorToolResultPresentation = VisitorSearchResultPresentation | VisitorToolResultPresentation | VisitorEntityResultPresentation | VisitorCollectionResultPresentation | VisitorSignatureResultPresentation | VisitorBookingResultPresentation | VisitorToolInputResultPresentation | VisitorHiddenToolResultPresentation;
225
244
  type VisitorToolResultPresenterOutput = (Omit<VisitorToolResultPresentation, "id" | "toolName" | "status"> & {
226
245
  status?: AgentToolResult["status"];
227
246
  }) | Omit<VisitorEntityResultPresentation, "id" | "toolName" | "status"> | Omit<VisitorCollectionResultPresentation, "id" | "toolName" | "status"> | Omit<VisitorSignatureResultPresentation, "id" | "toolName" | "status"> | {
@@ -277,6 +296,7 @@ type ConversationMessage = {
277
296
  text: string;
278
297
  createdAt: number;
279
298
  citations?: Citation[];
299
+ searchResults?: VisitorSearchResultPresentation[];
280
300
  toolReceipts?: string[];
281
301
  streaming?: boolean;
282
302
  };
@@ -290,7 +310,7 @@ type AgentRailState = {
290
310
  streamingText: string;
291
311
  pendingOffer: BookingOffer | null;
292
312
  pendingInputs?: AgentInputRequest[];
293
- toolResults?: (VisitorToolResultPresentation | VisitorEntityResultPresentation | VisitorCollectionResultPresentation | VisitorSignatureResultPresentation | VisitorToolInputResultPresentation)[];
313
+ toolResults?: (VisitorSearchResultPresentation | VisitorToolResultPresentation | VisitorEntityResultPresentation | VisitorCollectionResultPresentation | VisitorSignatureResultPresentation | VisitorToolInputResultPresentation)[];
294
314
  error: string | null;
295
315
  };
296
316
  type AgentRailTheme = {
@@ -412,4 +432,4 @@ declare function normalizeAgentTagManifest(manifest: AgentTagManifest): {
412
432
  };
413
433
  type NormalizedAgentTagManifest = ReturnType<typeof normalizeAgentTagManifest>;
414
434
 
415
- export { presentVisitorToolResult as $, AGENT_STRUCTURED_TOOL_INPUT_HEADER as A, AssistEdgeTab as B, type AssistTabSide as C, type AssistTabVariant as D, type Citation as E, type ConversationMessage as F, DEFAULT_AGENT_PLACEMENT as G, type FollowUpSuggestion as H, type ToolStepState as I, type JourneyContext as J, type VisitorBookingResultPresentation as K, type VisitorToolInputResultPresentation as L, type VisitorToolResultLink as M, type NormalizedAgentTagManifest as N, type VisitorToolResultPresentation as O, type VisitorToolResultPresenter as P, type VisitorToolResultPresenterOutput as Q, type ResolvedVisitorToolResultPresentation as R, type VisitorToolResultRegistry as S, type ToolStep as T, builtInVisitorToolResultRegistry as U, type VisitorBooking as V, defaultAgentRailTheme as W, defaultDarkAgentRailTheme as X, formatAgentStructuredToolInput as Y, normalizeAgentPlacement as Z, normalizeAgentTagManifest as _, AGENT_STRUCTURED_TOOL_INPUT_SCHEMA_VERSION as a, type AgentAnalyticsConfig as b, type AgentBrandingConfig as c, type AgentColorScheme as d, type AgentIndexVersion as e, type AgentInputOption as f, type AgentInputRequest as g, type AgentInputResponse as h, type AgentMessageFeedback as i, type AgentMountStrategy as j, type AgentPlacementConfig as k, type AgentRailPhase as l, type AgentRailState as m, type AgentRailTheme as n, type AgentStructuredToolInput as o, type AgentTabSide as p, type AgentTabVariant as q, type AgentTagManifest as r, type AgentToolResult as s, type AgentToolResultJsonValue as t, type AgentToolUiAction as u, type AgentToolUiField as v, type AgentToolUiFieldKind as w, type AgentToolUiOption as x, type AgentToolUiStep as y, type AgentToolUiSurface as z };
435
+ export { formatAgentStructuredToolInput as $, AGENT_STRUCTURED_TOOL_INPUT_HEADER as A, type AgentToolUiStep as B, type AgentToolUiSurface as C, AssistEdgeTab as D, type AssistTabSide as E, type AssistTabVariant as F, type Citation as G, type ConversationMessage as H, DEFAULT_AGENT_PLACEMENT as I, type FollowUpSuggestion as J, type JourneyContext as K, type ToolStepState as L, type VisitorBookingResultPresentation as M, type NormalizedAgentTagManifest as N, type VisitorSearchResultPresentation as O, type VisitorToolInputResultPresentation as P, type VisitorToolResultLink as Q, type ResolvedVisitorToolResultPresentation as R, type VisitorToolResultPresentation as S, type ToolStep as T, type VisitorToolResultPresenter as U, type VisitorBooking as V, type VisitorToolResultPresenterOutput as W, type VisitorToolResultRegistry as X, builtInVisitorToolResultRegistry as Y, defaultAgentRailTheme as Z, defaultDarkAgentRailTheme as _, AGENT_STRUCTURED_TOOL_INPUT_SCHEMA_VERSION as a, normalizeAgentPlacement as a0, normalizeAgentTagManifest as a1, presentVisitorToolResult as a2, type AgentAnalyticsConfig as b, type AgentBrandingConfig as c, type AgentColorScheme as d, type AgentIndexVersion as e, type AgentInputOption as f, type AgentInputRequest as g, type AgentInputResponse as h, type AgentMessageFeedback as i, type AgentMountStrategy as j, type AgentPlacementConfig as k, type AgentRailPhase as l, type AgentRailState as m, type AgentRailTheme as n, type AgentSearchReferences as o, type AgentSearchSource as p, type AgentStructuredToolInput as q, type AgentTabSide as r, type AgentTabVariant as s, type AgentTagManifest as t, type AgentToolResult as u, type AgentToolResultJsonValue as v, type AgentToolUiAction as w, type AgentToolUiField as x, type AgentToolUiFieldKind as y, type AgentToolUiOption as z };
@@ -149,6 +149,19 @@ type BookingCanceled = {
149
149
  };
150
150
  type ToolCard = BookingOffer | BookingConfirmed | BookingCanceled | VisitorFormCard;
151
151
 
152
+ type AgentSearchSource = {
153
+ id: string;
154
+ title: string;
155
+ url?: string;
156
+ };
157
+ type AgentSearchReferences = {
158
+ sources: AgentSearchSource[];
159
+ cta?: {
160
+ label: string;
161
+ url?: string;
162
+ };
163
+ };
164
+
152
165
  type VisitorToolResultLink = {
153
166
  label: string;
154
167
  href: string;
@@ -221,7 +234,13 @@ type VisitorHiddenToolResultPresentation = {
221
234
  status: AgentToolResult["status"];
222
235
  kind: "hidden";
223
236
  };
224
- type ResolvedVisitorToolResultPresentation = VisitorToolResultPresentation | VisitorEntityResultPresentation | VisitorCollectionResultPresentation | VisitorSignatureResultPresentation | VisitorBookingResultPresentation | VisitorToolInputResultPresentation | VisitorHiddenToolResultPresentation;
237
+ type VisitorSearchResultPresentation = AgentSearchReferences & {
238
+ id: string;
239
+ toolName: "search_discovery";
240
+ status: "completed";
241
+ kind: "search";
242
+ };
243
+ type ResolvedVisitorToolResultPresentation = VisitorSearchResultPresentation | VisitorToolResultPresentation | VisitorEntityResultPresentation | VisitorCollectionResultPresentation | VisitorSignatureResultPresentation | VisitorBookingResultPresentation | VisitorToolInputResultPresentation | VisitorHiddenToolResultPresentation;
225
244
  type VisitorToolResultPresenterOutput = (Omit<VisitorToolResultPresentation, "id" | "toolName" | "status"> & {
226
245
  status?: AgentToolResult["status"];
227
246
  }) | Omit<VisitorEntityResultPresentation, "id" | "toolName" | "status"> | Omit<VisitorCollectionResultPresentation, "id" | "toolName" | "status"> | Omit<VisitorSignatureResultPresentation, "id" | "toolName" | "status"> | {
@@ -277,6 +296,7 @@ type ConversationMessage = {
277
296
  text: string;
278
297
  createdAt: number;
279
298
  citations?: Citation[];
299
+ searchResults?: VisitorSearchResultPresentation[];
280
300
  toolReceipts?: string[];
281
301
  streaming?: boolean;
282
302
  };
@@ -290,7 +310,7 @@ type AgentRailState = {
290
310
  streamingText: string;
291
311
  pendingOffer: BookingOffer | null;
292
312
  pendingInputs?: AgentInputRequest[];
293
- toolResults?: (VisitorToolResultPresentation | VisitorEntityResultPresentation | VisitorCollectionResultPresentation | VisitorSignatureResultPresentation | VisitorToolInputResultPresentation)[];
313
+ toolResults?: (VisitorSearchResultPresentation | VisitorToolResultPresentation | VisitorEntityResultPresentation | VisitorCollectionResultPresentation | VisitorSignatureResultPresentation | VisitorToolInputResultPresentation)[];
294
314
  error: string | null;
295
315
  };
296
316
  type AgentRailTheme = {
@@ -412,4 +432,4 @@ declare function normalizeAgentTagManifest(manifest: AgentTagManifest): {
412
432
  };
413
433
  type NormalizedAgentTagManifest = ReturnType<typeof normalizeAgentTagManifest>;
414
434
 
415
- export { presentVisitorToolResult as $, AGENT_STRUCTURED_TOOL_INPUT_HEADER as A, AssistEdgeTab as B, type AssistTabSide as C, type AssistTabVariant as D, type Citation as E, type ConversationMessage as F, DEFAULT_AGENT_PLACEMENT as G, type FollowUpSuggestion as H, type ToolStepState as I, type JourneyContext as J, type VisitorBookingResultPresentation as K, type VisitorToolInputResultPresentation as L, type VisitorToolResultLink as M, type NormalizedAgentTagManifest as N, type VisitorToolResultPresentation as O, type VisitorToolResultPresenter as P, type VisitorToolResultPresenterOutput as Q, type ResolvedVisitorToolResultPresentation as R, type VisitorToolResultRegistry as S, type ToolStep as T, builtInVisitorToolResultRegistry as U, type VisitorBooking as V, defaultAgentRailTheme as W, defaultDarkAgentRailTheme as X, formatAgentStructuredToolInput as Y, normalizeAgentPlacement as Z, normalizeAgentTagManifest as _, AGENT_STRUCTURED_TOOL_INPUT_SCHEMA_VERSION as a, type AgentAnalyticsConfig as b, type AgentBrandingConfig as c, type AgentColorScheme as d, type AgentIndexVersion as e, type AgentInputOption as f, type AgentInputRequest as g, type AgentInputResponse as h, type AgentMessageFeedback as i, type AgentMountStrategy as j, type AgentPlacementConfig as k, type AgentRailPhase as l, type AgentRailState as m, type AgentRailTheme as n, type AgentStructuredToolInput as o, type AgentTabSide as p, type AgentTabVariant as q, type AgentTagManifest as r, type AgentToolResult as s, type AgentToolResultJsonValue as t, type AgentToolUiAction as u, type AgentToolUiField as v, type AgentToolUiFieldKind as w, type AgentToolUiOption as x, type AgentToolUiStep as y, type AgentToolUiSurface as z };
435
+ export { formatAgentStructuredToolInput as $, AGENT_STRUCTURED_TOOL_INPUT_HEADER as A, type AgentToolUiStep as B, type AgentToolUiSurface as C, AssistEdgeTab as D, type AssistTabSide as E, type AssistTabVariant as F, type Citation as G, type ConversationMessage as H, DEFAULT_AGENT_PLACEMENT as I, type FollowUpSuggestion as J, type JourneyContext as K, type ToolStepState as L, type VisitorBookingResultPresentation as M, type NormalizedAgentTagManifest as N, type VisitorSearchResultPresentation as O, type VisitorToolInputResultPresentation as P, type VisitorToolResultLink as Q, type ResolvedVisitorToolResultPresentation as R, type VisitorToolResultPresentation as S, type ToolStep as T, type VisitorToolResultPresenter as U, type VisitorBooking as V, type VisitorToolResultPresenterOutput as W, type VisitorToolResultRegistry as X, builtInVisitorToolResultRegistry as Y, defaultAgentRailTheme as Z, defaultDarkAgentRailTheme as _, AGENT_STRUCTURED_TOOL_INPUT_SCHEMA_VERSION as a, normalizeAgentPlacement as a0, normalizeAgentTagManifest as a1, presentVisitorToolResult as a2, type AgentAnalyticsConfig as b, type AgentBrandingConfig as c, type AgentColorScheme as d, type AgentIndexVersion as e, type AgentInputOption as f, type AgentInputRequest as g, type AgentInputResponse as h, type AgentMessageFeedback as i, type AgentMountStrategy as j, type AgentPlacementConfig as k, type AgentRailPhase as l, type AgentRailState as m, type AgentRailTheme as n, type AgentSearchReferences as o, type AgentSearchSource as p, type AgentStructuredToolInput as q, type AgentTabSide as r, type AgentTabVariant as s, type AgentTagManifest as t, type AgentToolResult as u, type AgentToolResultJsonValue as v, type AgentToolUiAction as w, type AgentToolUiField as x, type AgentToolUiFieldKind as y, type AgentToolUiOption as z };