@pagelines/sdk 1.0.877 → 1.0.879

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 (92) hide show
  1. package/README.md +68 -68
  2. package/dist/BotProvider.js +777 -0
  3. package/dist/BotProvider.js.map +1 -0
  4. package/dist/{AgentWidgetInline.js → BotWidgetInline.js} +8 -8
  5. package/dist/BotWidgetInline.js.map +1 -0
  6. package/dist/{AgentWidgetModal.js → BotWidgetModal.js} +7 -7
  7. package/dist/BotWidgetModal.js.map +1 -0
  8. package/dist/{AgentWrap.js → BotWrap.js} +1202 -1155
  9. package/dist/BotWrap.js.map +1 -0
  10. package/dist/{agent/AgentController.d.ts → bot/BotController.d.ts} +36 -18
  11. package/dist/bot/index.d.ts +14 -0
  12. package/dist/{agent → bot}/schema.d.ts +6 -6
  13. package/dist/{agent/ui/AgentAvatar.vue.d.ts → bot/ui/BotAvatar.vue.d.ts} +6 -6
  14. package/dist/{agent/ui/AgentChat.vue.d.ts → bot/ui/BotChat.vue.d.ts} +5 -5
  15. package/dist/{agent/ui/AgentProvider.vue.d.ts → bot/ui/BotProvider.vue.d.ts} +3 -3
  16. package/dist/{agent/ui/AgentWrap.vue.d.ts → bot/ui/BotWrap.vue.d.ts} +3 -4
  17. package/dist/{agent/ui/ElAgentAbout.vue.d.ts → bot/ui/ElBotAbout.vue.d.ts} +2 -2
  18. package/dist/{agent/ui/ElAgentChat.vue.d.ts → bot/ui/ElBotChat.vue.d.ts} +5 -5
  19. package/dist/{agent/ui/ElAgentChatPreview.vue.d.ts → bot/ui/ElBotChatPreview.vue.d.ts} +1 -1
  20. package/dist/{agent/ui/ElAgentHeader.vue.d.ts → bot/ui/ElBotHeader.vue.d.ts} +2 -2
  21. package/dist/{agent/ui/ElAgentModeSidebar.vue.d.ts → bot/ui/ElBotModeSidebar.vue.d.ts} +2 -2
  22. package/dist/{agent/ui/ElAgentSidebar.vue.d.ts → bot/ui/ElBotSidebar.vue.d.ts} +2 -2
  23. package/dist/bot/ui/ElCreateBot.vue.d.ts +12 -0
  24. package/dist/{agent → bot}/ui/ElModeHeader.vue.d.ts +2 -2
  25. package/dist/{agent → bot}/ui/ElProvisioningStatus.vue.d.ts +1 -1
  26. package/dist/{agent → bot}/ui/VoiceMode.vue.d.ts +4 -4
  27. package/dist/{agent → bot}/utils.d.ts +5 -5
  28. package/dist/{agent → bot}/voice/provider.d.ts +2 -2
  29. package/dist/{agent → bot}/voice/providers/livekit/provider.d.ts +8 -7
  30. package/dist/{agent → bot}/voice/voice-session-client.d.ts +2 -1
  31. package/dist/{agent → bot}/work-journal.d.ts +1 -1
  32. package/dist/{agent.js → bot.js} +89 -84
  33. package/dist/bot.js.map +1 -0
  34. package/dist/clients/BillingClient.d.ts +1 -1
  35. package/dist/clients/BotClient.d.ts +26 -0
  36. package/dist/clients/ChatClient.d.ts +6 -5
  37. package/dist/clients/ComputerClient.d.ts +16 -0
  38. package/dist/clients/UserClient.d.ts +4 -7
  39. package/dist/clients/types.d.ts +7 -2
  40. package/dist/contract/build.d.ts +1 -2
  41. package/dist/index.d.ts +3 -2
  42. package/dist/provider.js +1 -1
  43. package/dist/provider.js.map +1 -1
  44. package/dist/provider2.js +28 -36
  45. package/dist/provider2.js.map +1 -1
  46. package/dist/sdk.css +1 -1
  47. package/dist/sdk.js +4 -4
  48. package/dist/sdkClient.d.ts +33 -376
  49. package/dist/sdkClient.js +168 -170
  50. package/dist/sdkClient.js.map +1 -1
  51. package/dist/useWidgetState.js +9 -9
  52. package/dist/useWidgetState.js.map +1 -1
  53. package/dist/widget/PLWidget.d.ts +6 -6
  54. package/dist/widget/composables/useWidgetState.d.ts +3 -402
  55. package/dist/widget/index.d.ts +2 -2
  56. package/dist/widget/mode.d.ts +2 -2
  57. package/dist/widget/ui/{AgentWidgetInline.vue.d.ts → BotWidgetInline.vue.d.ts} +2 -2
  58. package/dist/widget/ui/{AgentWidgetModal.vue.d.ts → BotWidgetModal.vue.d.ts} +2 -2
  59. package/dist/widget/ui/{AgentWidgetPopup.vue.d.ts → BotWidgetPopup.vue.d.ts} +4 -4
  60. package/dist/widget.js +206 -206
  61. package/dist/widget.js.map +1 -1
  62. package/package.json +5 -5
  63. package/dist/AgentProvider.js +0 -764
  64. package/dist/AgentProvider.js.map +0 -1
  65. package/dist/AgentWidgetInline.js.map +0 -1
  66. package/dist/AgentWidgetModal.js.map +0 -1
  67. package/dist/AgentWrap.js.map +0 -1
  68. package/dist/agent/index.d.ts +0 -14
  69. package/dist/agent/ui/ElCreateAgent.vue.d.ts +0 -277
  70. package/dist/agent.js.map +0 -1
  71. package/dist/clients/AgentClient.d.ts +0 -48
  72. /package/dist/{agent → bot}/VoiceRecorderController.d.ts +0 -0
  73. /package/dist/{agent/ui/AgentInputEmail.vue.d.ts → bot/ui/BotInputEmail.vue.d.ts} +0 -0
  74. /package/dist/{agent/ui/AgentInputOneTimeCode.vue.d.ts → bot/ui/BotInputOneTimeCode.vue.d.ts} +0 -0
  75. /package/dist/{agent/ui/AgentSidebarClose.vue.d.ts → bot/ui/BotSidebarClose.vue.d.ts} +0 -0
  76. /package/dist/{agent/ui/AgentToolActivityGroup.vue.d.ts → bot/ui/BotToolActivityGroup.vue.d.ts} +0 -0
  77. /package/dist/{agent/ui/AgentWidget.vue.d.ts → bot/ui/BotWidget.vue.d.ts} +0 -0
  78. /package/dist/{agent → bot}/ui/ChatCardBlock.vue.d.ts +0 -0
  79. /package/dist/{agent → bot}/ui/ChatRichText.vue.d.ts +0 -0
  80. /package/dist/{agent → bot}/ui/ChatScroller.vue.d.ts +0 -0
  81. /package/dist/{agent → bot}/ui/ChatVisualBlock.vue.d.ts +0 -0
  82. /package/dist/{agent → bot}/ui/ElAuthGate.vue.d.ts +0 -0
  83. /package/dist/{agent → bot}/ui/ElAuthPanel.vue.d.ts +0 -0
  84. /package/dist/{agent/ui/ElAgentButton.vue.d.ts → bot/ui/ElBotButton.vue.d.ts} +0 -0
  85. /package/dist/{agent → bot}/ui/ElSidebar.vue.d.ts +0 -0
  86. /package/dist/{agent → bot}/ui/VoiceHistogramController.d.ts +0 -0
  87. /package/dist/{agent → bot}/ui/chat-diagram-layout.d.ts +0 -0
  88. /package/dist/{agent → bot}/ui/chat-visual-format.d.ts +0 -0
  89. /package/dist/{agent → bot}/ui/voice-mode-presentation.d.ts +0 -0
  90. /package/dist/{agent → bot}/voice/voice-error-copy.d.ts +0 -0
  91. /package/dist/{agent → bot}/voice/voice-work-state.d.ts +0 -0
  92. /package/dist/widget/ui/{AgentWidgetOnboard.vue.d.ts → BotWidgetOnboard.vue.d.ts} +0 -0
@@ -1,14 +1,14 @@
1
1
  import { ComputedRef, Ref } from 'vue';
2
- import { AgentConfig, ChatStreamError, ChatToolActivityData, SettingsObject } from '@pagelines/core';
2
+ import { ChatStreamError, ChatToolActivityData, SettingsObject } from '@pagelines/core';
3
3
  import { PageLinesSDK } from '../sdkClient';
4
- import { AgentMode, ChatAttachment, ChatMessage, TextConnectionState, Agent } from './schema';
4
+ import { BotMode, ChatAttachment, ChatMessage, TextConnectionState, Bot } from './schema';
5
5
  import { VoiceClientHandlers, VoiceSessionClient } from './voice/voice-session-client';
6
6
  import { LiveTurnBlock, WorkJournalModel, WorkJournalOutcome } from './work-journal';
7
7
  import { VoiceRecorderController } from './VoiceRecorderController';
8
8
  export type ChatStreamErrorPresentation = {
9
9
  surface: 'transcript';
10
10
  issue: NonNullable<ChatMessage['issue']>;
11
- sendBlockedReason?: 'account' | 'agent_deleted';
11
+ sendBlockedReason?: 'account' | 'bot_deleted';
12
12
  } | {
13
13
  surface: 'transient';
14
14
  issue: NonNullable<TextConnectionState['transientIssue']>;
@@ -20,7 +20,7 @@ export type ChatStreamErrorPresentation = {
20
20
  *
21
21
  * Server contract: an `error` frame is never persisted — a message-shaped
22
22
  * render of one silently vanishes on reload ("no disappearing states").
23
- * Durable blocks (account bucket / deleted agent) keep the transcript row +
23
+ * Durable blocks (account bucket / deleted bot) keep the transcript row +
24
24
  * send block because the widget gate path has no persisted explainer behind
25
25
  * them; every other soft issue is retry-in-chat → live chrome, like
26
26
  * `workingDescription`.
@@ -37,6 +37,7 @@ export type ChatStreamFn = (args: {
37
37
  }>;
38
38
  onDelta: (text: string, role?: 'assistant' | 'system') => void;
39
39
  onMessage?: (message: ChatMessage) => void;
40
+ onUserMessage?: (message: ChatMessage) => void;
40
41
  onDone: (conversationId: string) => void;
41
42
  onError: (error: string | ChatStreamError) => void;
42
43
  onStatus?: (status: string) => void;
@@ -46,24 +47,32 @@ export type ChatStreamFn = (args: {
46
47
  export type ChatUploadFn = (args: {
47
48
  file: File;
48
49
  }) => Promise<ChatAttachment>;
49
- export type AgentChatComposerState = {
50
+ export type BotChatComposerState = {
50
51
  text: string;
51
52
  pendingAttachments: ChatAttachment[];
52
53
  isUploading: boolean;
53
54
  };
54
- export type AgentChatControllerSettings = {
55
+ export type BotChatControllerSettings = {
55
56
  sdk?: PageLinesSDK;
56
- agent: Agent | AgentConfig;
57
+ bot: Bot;
57
58
  context?: string;
58
59
  firstMessage?: string;
59
60
  chatStreamFn?: ChatStreamFn;
60
61
  cancelChatTurnFn?: (args: {
61
62
  conversationId?: string;
62
63
  }) => Promise<void> | void;
64
+ /**
65
+ * Flag an assistant message. Omitted by hosts with no authenticated
66
+ * reporter (the public widget), which hides the action rather than
67
+ * offering a button that cannot report.
68
+ */
69
+ reportMessageFn?: (args: {
70
+ messageId: string;
71
+ }) => Promise<void>;
63
72
  uploadFileFn?: ChatUploadFn;
64
73
  /**
65
- * Where this agent is managed (wake/rebuild). In-app surfaces pass it so
66
- * an asleep-agent send can answer with a wake link; anonymous/widget
74
+ * Where this bot is managed (wake/rebuild). In-app surfaces pass it so
75
+ * an asleep-bot send can answer with a wake link; anonymous/widget
67
76
  * surfaces omit it — a visitor can't wake someone else's assistant.
68
77
  */
69
78
  manageUrl?: string;
@@ -86,7 +95,7 @@ export type AgentChatControllerSettings = {
86
95
  */
87
96
  createVoiceClientFn?: (args: {
88
97
  /** Validated by the controller's gate — the surface does not re-check. */
89
- agentId: string;
98
+ botId: string;
90
99
  orgId: string;
91
100
  conversationId?: string;
92
101
  handlers: VoiceClientHandlers;
@@ -96,7 +105,7 @@ export type AgentChatControllerSettings = {
96
105
  onTurnStarted?: () => void;
97
106
  onTurnCompleted?: (conversationId: string) => void;
98
107
  };
99
- export declare class AgentChatController extends SettingsObject<AgentChatControllerSettings> {
108
+ export declare class BotChatController extends SettingsObject<BotChatControllerSettings> {
100
109
  private isTextMode;
101
110
  private lastMessage;
102
111
  private isConnecting;
@@ -137,9 +146,9 @@ export declare class AgentChatController extends SettingsObject<AgentChatControl
137
146
  readonly liveStreamMessageId: import('vue').ShallowRef<string | undefined, string | undefined>;
138
147
  private conversationId?;
139
148
  textState: Ref<TextConnectionState>;
140
- agentMode: Ref<AgentMode>;
149
+ botMode: Ref<BotMode>;
141
150
  sharedMessages: Ref<ChatMessage[]>;
142
- readonly composerState: Ref<AgentChatComposerState>;
151
+ readonly composerState: Ref<BotChatComposerState>;
143
152
  /**
144
153
  * The live line of work for the in-flight turn. Present only once the first
145
154
  * activity arrives (before that, the top-level thinking cue owns the state —
@@ -181,8 +190,8 @@ export declare class AgentChatController extends SettingsObject<AgentChatControl
181
190
  /** Build the live-conversation client for the voice surface. Undefined when this surface can't do voice. */
182
191
  createVoiceClient(handlers: VoiceClientHandlers): VoiceSessionClient | undefined;
183
192
  refreshMessages(): Promise<void>;
184
- private _agent;
185
- constructor(settings: AgentChatControllerSettings);
193
+ private _bot;
194
+ constructor(settings: BotChatControllerSettings);
186
195
  get chatEnabled(): boolean;
187
196
  get chatUnavailableReason(): string | undefined;
188
197
  private mapChatError;
@@ -190,7 +199,7 @@ export declare class AgentChatController extends SettingsObject<AgentChatControl
190
199
  * Errors we treat as recoverable mid-conversation: rate limits, timeouts,
191
200
  * transient infra blips, dropped streams. We render an inline system bubble
192
201
  * and keep the input enabled so the next attempt can succeed without
193
- * forcing a manual reload. Hard errors (auth lost, agent missing) still
202
+ * forcing a manual reload. Hard errors (auth lost, bot missing) still
194
203
  * fall through to handleError which marks the conversation dead.
195
204
  */
196
205
  private isTransientError;
@@ -214,6 +223,15 @@ export declare class AgentChatController extends SettingsObject<AgentChatControl
214
223
  * feedback" miss flagged in design.md → Action Feedback Contract.
215
224
  */
216
225
  notify(text: string): void;
226
+ /** Whether this host can report at all — the action hides when it cannot. */
227
+ get canReportMessages(): boolean;
228
+ /**
229
+ * Flag an assistant message, matching what iOS has sent since it shipped:
230
+ * no category, no reason. The owner is never asked to classify what upset
231
+ * them, and the acknowledgement rides the same system bubble as every other
232
+ * adjacent-surface result.
233
+ */
234
+ reportMessage(messageId: string): Promise<void>;
217
235
  setComposerText(args: {
218
236
  text: string;
219
237
  }): void;
@@ -282,10 +300,10 @@ export declare class AgentChatController extends SettingsObject<AgentChatControl
282
300
  * alone doesn't render anywhere. The raw error is kept on console.error
283
301
  * so devs can tell which pipeline stage failed (the `[api]` /
284
302
  * `[stream-open]` / `[stream-read]` / `[no-reply]` tags from
285
- * agent/client.ts survive into the console line).
303
+ * bot/client.ts survive into the console line).
286
304
  */
287
305
  private handleError;
288
- setMode(mode: AgentMode): Promise<void>;
306
+ setMode(mode: BotMode): Promise<void>;
289
307
  startTextConversation(callbacks?: {
290
308
  onConnect?: () => void;
291
309
  }): Promise<void>;
@@ -0,0 +1,14 @@
1
+ import { default as BotChat } from './ui/BotChat.vue';
2
+ import { default as BotProvider } from './ui/BotProvider.vue';
3
+ import { default as BotWidget } from './ui/BotWidget.vue';
4
+ import { default as BotWrap } from './ui/BotWrap.vue';
5
+ import { default as ElBotChat } from './ui/ElBotChat.vue';
6
+ import { default as ElBotChatPreview } from './ui/ElBotChatPreview.vue';
7
+ import { default as VoiceMode } from './ui/VoiceMode.vue';
8
+ export { BotChatController } from './BotController';
9
+ export type { BotChatComposerState, ChatStreamFn, ChatUploadFn } from './BotController';
10
+ export { VoiceSessionClient } from './voice/voice-session-client';
11
+ export type { VoiceClientHandlers, VoiceLevelEvent, VoiceMetric, VoiceMetricName, VoiceSessionClientState, VoiceSessionError, } from './voice/voice-session-client';
12
+ export type { WorkJournalModel, WorkJournalOutcome, WorkJournalRow, WorkJournalTone } from './work-journal';
13
+ export * from './schema';
14
+ export { BotChat, BotProvider, BotWidget, BotWrap, ElBotChat, ElBotChatPreview, VoiceMode };
@@ -1,6 +1,6 @@
1
1
  import { ChatAttachment, ChatToolActivityData } from '@pagelines/core';
2
- export { Agent } from '@pagelines/core';
3
- export type { AgentConfig, ChatAttachment, ChatToolActivityData as ChatToolActivity } from '@pagelines/core';
2
+ export { Bot } from '@pagelines/core';
3
+ export type { BotData, ChatAttachment, ChatToolActivityData as ChatToolActivity } from '@pagelines/core';
4
4
  export interface ChatMessageIssue {
5
5
  code: string;
6
6
  bucket: 'account' | 'error';
@@ -11,7 +11,7 @@ export interface ChatMessageIssue {
11
11
  export interface ChatMessage {
12
12
  id: string;
13
13
  text: string;
14
- sender: 'user' | 'agent' | 'system';
14
+ sender: 'user' | 'bot' | 'system';
15
15
  timestamp: string;
16
16
  conversationId?: string;
17
17
  sequence?: string;
@@ -49,7 +49,7 @@ export interface TextConnectionState {
49
49
  * session. Stays set until the controller is recreated or upstream state
50
50
  * changes and the chat reloads.
51
51
  */
52
- sendBlockedReason?: 'account' | 'agent_deleted';
52
+ sendBlockedReason?: 'account' | 'bot_deleted';
53
53
  /**
54
54
  * Transient turn failure from an `error` SSE frame the server did NOT
55
55
  * persist. Live chrome like `workingDescription` — never a transcript
@@ -64,7 +64,7 @@ export interface TextConnectionState {
64
64
  help?: string;
65
65
  };
66
66
  }
67
- export declare const AGENT_MODES: readonly [{
67
+ export declare const BOT_MODES: readonly [{
68
68
  readonly mode: "self";
69
69
  readonly label: "Overview";
70
70
  readonly icon: "i-tabler-user-square-rounded";
@@ -81,4 +81,4 @@ export declare const AGENT_MODES: readonly [{
81
81
  readonly label: "About";
82
82
  readonly icon: "i-tabler-user-circle";
83
83
  }];
84
- export type AgentMode = (typeof AGENT_MODES)[number]['mode'];
84
+ export type BotMode = (typeof BOT_MODES)[number]['mode'];
@@ -1,14 +1,14 @@
1
- import { Agent } from '@pagelines/core';
1
+ import { Bot } from '@pagelines/core';
2
2
  /**
3
- * The one agent avatar. Image + status dot (upper-right arc) + owner
4
- * sub-mark (lower-left tangent), all derived from the canonical `Agent`
3
+ * The one bot avatar. Image + status dot (upper-right arc) + owner
4
+ * sub-mark (lower-left tangent), all derived from the canonical `Bot`
5
5
  * — never from per-call-site props that can drift.
6
6
  *
7
7
  * Product rule: an assistant's avatar ALWAYS carries its owner mark.
8
8
  * The mark matters most exactly where it used to be suppressed — a
9
- * public agent an anonymous visitor is meeting for the first time, where
9
+ * public bot an anonymous visitor is meeting for the first time, where
10
10
  * "whose assistant is this" is the question and the visitor has no other
11
- * way to answer it. `Agent.ownerMarkUrl` is the single source.
11
+ * way to answer it. `Bot.ownerMarkUrl` is the single source.
12
12
  *
13
13
  * Geometry mirrors the app's `IdentityAvatar` / `StatusDot`: dot at the
14
14
  * 45° arc point (14.6% inset, minus half the dot), sub-mark 36% of the
@@ -17,7 +17,7 @@ import { Agent } from '@pagelines/core';
17
17
  * standalone and cannot depend on app `src/`; keep the two in step.
18
18
  */
19
19
  type __VLS_Props = {
20
- agent: Agent;
20
+ bot: Bot;
21
21
  showStatus?: boolean;
22
22
  /** Voice mode opts out: the owner is the one present and speaking, so the "whose assistant is this" question is already answered. */
23
23
  showOwnerMark?: boolean;
@@ -1,11 +1,11 @@
1
- import { AgentChatControllerSettings } from '../AgentController';
1
+ import { BotChatControllerSettings } from '../BotController';
2
2
  import { PageLinesSDK } from '../../sdkClient';
3
3
  import { ButtonIconPreset } from '../../widget/PLWidget';
4
4
  import { ColorName } from '@pagelines/core';
5
- import { Agent } from '../schema';
5
+ import { Bot } from '../schema';
6
6
  type __VLS_Props = {
7
7
  sdk: PageLinesSDK;
8
- agent: Agent;
8
+ bot: Bot;
9
9
  context?: string;
10
10
  firstMessage?: string;
11
11
  buttonText?: string;
@@ -20,11 +20,11 @@ type __VLS_Props = {
20
20
  bare?: boolean;
21
21
  emptyStateMessage?: string;
22
22
  /** Voice transport, supplied by hosts that ship it. See the note in createChatController. */
23
- createVoiceClientFn?: AgentChatControllerSettings['createVoiceClientFn'];
23
+ createVoiceClientFn?: BotChatControllerSettings['createVoiceClientFn'];
24
24
  };
25
25
  type __VLS_Slots = {
26
26
  'empty-heading': (props: {
27
- agent: Agent;
27
+ bot: Bot;
28
28
  isLight: boolean;
29
29
  }) => any;
30
30
  };
@@ -1,9 +1,9 @@
1
1
  import { PageLinesSDK } from '../../sdkClient';
2
2
  import { ButtonIconPreset } from '../../widget/PLWidget';
3
- import { Agent, AgentConfig } from '../schema';
3
+ import { Bot } from '../schema';
4
4
  type __VLS_Props = {
5
5
  sdk?: PageLinesSDK;
6
- agent?: AgentConfig;
6
+ bot?: Bot;
7
7
  handle?: string;
8
8
  context?: string;
9
9
  clientContext?: string;
@@ -18,7 +18,7 @@ type __VLS_Props = {
18
18
  };
19
19
  type __VLS_Slots = {
20
20
  'empty-heading': (props: {
21
- agent: Agent;
21
+ bot: Bot;
22
22
  isLight: boolean;
23
23
  }) => any;
24
24
  };
@@ -1,10 +1,9 @@
1
- import { AgentConfig } from '@pagelines/core';
2
1
  import { PageLinesSDK } from '../../sdkClient';
3
2
  import { ButtonIconPreset } from '../../widget/PLWidget';
4
- import { Agent } from '../schema';
3
+ import { Bot } from '../schema';
5
4
  type __VLS_Props = {
6
5
  sdk?: PageLinesSDK;
7
- agent?: AgentConfig;
6
+ bot?: Bot;
8
7
  handle?: string;
9
8
  context?: string;
10
9
  clientContext?: string;
@@ -19,7 +18,7 @@ type __VLS_Props = {
19
18
  type __VLS_Slots = {
20
19
  default: (props: {
21
20
  sdk: PageLinesSDK;
22
- agent: Agent;
21
+ bot: Bot;
23
22
  context?: string;
24
23
  firstMessage?: string;
25
24
  buttonText?: string;
@@ -1,6 +1,6 @@
1
- import { Agent } from '../schema';
1
+ import { Bot } from '../schema';
2
2
  type __VLS_Props = {
3
- agent: Agent;
3
+ bot: Bot;
4
4
  isOnline?: boolean;
5
5
  };
6
6
  declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
@@ -1,9 +1,9 @@
1
- import { AgentChatController } from '../AgentController';
2
- import { Agent } from '@pagelines/core';
1
+ import { BotChatController } from '../BotController';
2
+ import { Bot } from '@pagelines/core';
3
3
  type ChatScope = 'private' | 'org' | 'public';
4
4
  type __VLS_Props = {
5
- chatController?: AgentChatController;
6
- agent: Agent;
5
+ chatController?: BotChatController;
6
+ bot: Bot;
7
7
  variant?: 'dark' | 'light';
8
8
  scope?: ChatScope;
9
9
  scopeName?: string;
@@ -16,7 +16,7 @@ type __VLS_Props = {
16
16
  };
17
17
  type __VLS_Slots = {
18
18
  'empty-heading': (props: {
19
- agent: Agent;
19
+ bot: Bot;
20
20
  isLight: boolean;
21
21
  }) => any;
22
22
  /**
@@ -1,5 +1,5 @@
1
1
  export type ChatPreviewMessage = {
2
- sender: 'user' | 'agent';
2
+ sender: 'user' | 'bot';
3
3
  text: string;
4
4
  };
5
5
  type __VLS_Props = {
@@ -1,6 +1,6 @@
1
- import { Agent } from '@pagelines/core';
1
+ import { Bot } from '@pagelines/core';
2
2
  interface Props {
3
- agent: Agent;
3
+ bot: Bot;
4
4
  isOnline?: boolean;
5
5
  }
6
6
  declare const __VLS_export: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
@@ -1,7 +1,7 @@
1
- import { AgentChatController } from '../AgentController';
1
+ import { BotChatController } from '../BotController';
2
2
  type __VLS_Props = {
3
3
  modelValue: boolean;
4
- chatController?: AgentChatController;
4
+ chatController?: BotChatController;
5
5
  };
6
6
  declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
7
7
  "update:modelValue": (value: boolean) => any;
@@ -1,8 +1,8 @@
1
1
  import { PageLinesSDK } from '../../sdkClient';
2
- import { Agent } from '../schema';
2
+ import { Bot } from '../schema';
3
3
  type __VLS_Props = {
4
4
  modelValue: boolean;
5
- agent: Agent;
5
+ bot: Bot;
6
6
  sdk: PageLinesSDK;
7
7
  title?: string;
8
8
  };
@@ -0,0 +1,12 @@
1
+ import { Bot } from '@pagelines/core';
2
+ import { PageLinesSDK } from '../../sdkClient';
3
+ type __VLS_Props = {
4
+ sdk: PageLinesSDK;
5
+ };
6
+ declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
7
+ created: (bot: Bot) => any;
8
+ }, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
9
+ onCreated?: ((bot: Bot) => any) | undefined;
10
+ }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
11
+ declare const _default: typeof __VLS_export;
12
+ export default _default;
@@ -1,6 +1,6 @@
1
- import { Agent } from '@pagelines/core';
1
+ import { Bot } from '@pagelines/core';
2
2
  interface Props {
3
- agent: Agent;
3
+ bot: Bot;
4
4
  size?: 'md' | 'lg';
5
5
  isOnline?: boolean;
6
6
  layout?: 'centered' | 'horizontal';
@@ -1,7 +1,7 @@
1
1
  import { PageLinesSDK } from '../../sdkClient';
2
2
  type __VLS_Props = {
3
3
  sdk: PageLinesSDK;
4
- agentId: string;
4
+ computerId: string;
5
5
  };
6
6
  declare const __VLS_export: import('vue').DefineComponent<__VLS_Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
7
7
  error: (message: string) => any;
@@ -1,8 +1,8 @@
1
- import { Agent } from '@pagelines/core';
2
- import { AgentChatController } from '../AgentController';
1
+ import { Bot } from '@pagelines/core';
2
+ import { BotChatController } from '../BotController';
3
3
  type __VLS_Props = {
4
- agent: Agent;
5
- chatController?: AgentChatController;
4
+ bot: Bot;
5
+ chatController?: BotChatController;
6
6
  isLight?: boolean;
7
7
  /**
8
8
  * The avatar to fill the background with, already decoded by the host
@@ -1,17 +1,17 @@
1
- import { AgentConfig, getDefaultAvatarUrl } from '@pagelines/core';
1
+ import { BotData, getDefaultAvatarUrl } from '@pagelines/core';
2
2
  export { getDefaultAvatarUrl };
3
3
  export declare function getImageSrc(image: string | {
4
4
  src?: string;
5
5
  } | undefined): string;
6
- type AgentLike = Pick<AgentConfig, 'cover' | 'avatar' | 'name'>;
7
- export declare function getAgentAvatarUrl(agent: AgentLike): string;
6
+ type BotLike = Pick<BotData, 'cover' | 'avatar' | 'name'>;
7
+ export declare function getBotAvatarUrl(bot: BotLike): string;
8
8
  export declare function handleImageError(event: Event): void;
9
9
  export declare function parseVoiceMessage(args: {
10
10
  message: string;
11
11
  source: string;
12
12
  }): {
13
13
  text: string;
14
- sender: 'user' | 'agent';
14
+ sender: 'user' | 'bot';
15
15
  } | null;
16
16
  /**
17
17
  * Parse button template string with self data variables
@@ -27,5 +27,5 @@ export declare function parseVoiceMessage(args: {
27
27
  */
28
28
  export declare function parseButtonTemplate(args: {
29
29
  template: string;
30
- agent: Pick<AgentConfig, 'name' | 'title' | 'handle' | 'org'>;
30
+ bot: Pick<BotData, 'name' | 'title' | 'handle'>;
31
31
  }): string;
@@ -12,7 +12,7 @@ export interface VoiceSessionError {
12
12
  code: string;
13
13
  message: string;
14
14
  }
15
- export type VoiceDisconnectCause = 'agent' | 'error' | 'network' | 'unknown';
15
+ export type VoiceDisconnectCause = 'bot' | 'error' | 'network' | 'unknown';
16
16
  /**
17
17
  * Who the transport says is talking. Raw energy is not a speech signal — room
18
18
  * tone and the speaker's own playback both read as audible — so ducking,
@@ -20,7 +20,7 @@ export type VoiceDisconnectCause = 'agent' | 'error' | 'network' | 'unknown';
20
20
  */
21
21
  export interface VoiceSpeakingState {
22
22
  user: boolean;
23
- agent: boolean;
23
+ bot: boolean;
24
24
  }
25
25
  export interface VoiceProviderClient {
26
26
  connect: (handlers: {
@@ -1,5 +1,6 @@
1
1
  import { VoiceSessionMint } from '@pagelines/core';
2
2
  import { VoiceLevelEvent, VoiceProviderClient } from '../../provider';
3
+ import { LocalAudioTrack } from 'livekit-client';
3
4
  type LiveKitMint = Extract<VoiceSessionMint, {
4
5
  provider: 'livekit';
5
6
  }>;
@@ -15,7 +16,7 @@ export interface VoiceRoom {
15
16
  on: (event: string, handler: (...args: any[]) => void) => unknown;
16
17
  off: (event: string, handler: (...args: any[]) => void) => unknown;
17
18
  remoteParticipants: ReadonlyMap<string, {
18
- isAgent: boolean;
19
+ isBot: boolean;
19
20
  attributes: Readonly<Record<string, string>>;
20
21
  }>;
21
22
  localParticipant: {
@@ -23,10 +24,10 @@ export interface VoiceRoom {
23
24
  echoCancellation?: boolean;
24
25
  noiseSuppression?: boolean;
25
26
  }) => Promise<{
26
- track?: unknown;
27
+ track?: Pick<LocalAudioTrack, 'stop'>;
27
28
  } | undefined>;
28
- getTrackPublication?: (source: string) => {
29
- track?: unknown;
29
+ getTrackPublication: (source: string) => {
30
+ track?: Pick<LocalAudioTrack, 'stop'>;
30
31
  } | undefined;
31
32
  };
32
33
  }
@@ -41,8 +42,8 @@ export declare class LiveKitVoiceProvider implements VoiceProviderClient {
41
42
  private attachedElements;
42
43
  private closing;
43
44
  private userSpeaking;
44
- private agentActiveSpeaker;
45
- private agentStateSpeaking;
45
+ private botActiveSpeaker;
46
+ private botStateSpeaking;
46
47
  private lastSpeaking?;
47
48
  constructor(mint: LiveKitMint, deps?: {
48
49
  createRoom?: () => VoiceRoom;
@@ -53,7 +54,7 @@ export declare class LiveKitVoiceProvider implements VoiceProviderClient {
53
54
  setMuted(muted: boolean): Promise<void>;
54
55
  sampleLevel(prefer?: VoiceLevelEvent['source']): ReturnType<VoiceProviderClient['sampleLevel']>;
55
56
  private publishSpeaking;
56
- private waitForAgentReady;
57
+ private waitForBotReady;
57
58
  private analyserFor;
58
59
  private watchMicLevel;
59
60
  private attachRemoteAudio;
@@ -23,7 +23,7 @@ export interface VoiceClientHandlers {
23
23
  onWorkChange?: (work: VoiceWorkStatus) => void;
24
24
  }
25
25
  export interface VoiceSessionClientSettings extends VoiceClientHandlers, Record<string, unknown> {
26
- agentId: string;
26
+ botId: string;
27
27
  orgId: string;
28
28
  conversationId?: string;
29
29
  /** Last message already loaded by the host; the work stream starts after it. */
@@ -64,6 +64,7 @@ export declare class VoiceSessionClient extends SettingsObject<VoiceSessionClien
64
64
  readonly state: Ref<VoiceSessionClientState>;
65
65
  readonly isMuted: Ref<boolean>;
66
66
  private provider?;
67
+ private teardownPromise?;
67
68
  private providerName?;
68
69
  private chime?;
69
70
  private workCue?;
@@ -38,7 +38,7 @@ export type WorkJournalModel = {
38
38
  * Views never infer the turn outcome from child activity statuses.
39
39
  */
40
40
  export declare function durableJournalOutcome(msg: {
41
- sender: 'user' | 'agent' | 'system';
41
+ sender: 'user' | 'bot' | 'system';
42
42
  turnOutcome?: 'failed' | 'stopped';
43
43
  }): WorkJournalOutcome;
44
44
  /**