@arbor-education/agent-view-frontend 0.7.2 → 0.8.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.ts CHANGED
@@ -1,4 +1,6 @@
1
1
  import { JSX as JSX_2 } from 'react';
2
+ import { ThinkingUpdate } from '../../../node_modules/@arbor-education/ask-arbor-chat-panel/dist/index.js';
3
+ import { ThinkingUpdate as ThinkingUpdate_2 } from '../../node_modules/@arbor-education/ask-arbor-chat-panel/dist/index.js';
2
4
 
3
5
  export declare type Agent = {
4
6
  id: string;
@@ -48,7 +50,7 @@ export declare type AgentChecklistItem = {
48
50
  children?: AgentChecklistItem[];
49
51
  };
50
52
 
51
- export declare type AgentChecklistItemStatus = 'generating-a-response' | 'hitl' | 'complete' | 'failed';
53
+ export declare type AgentChecklistItemStatus = 'generating-a-response' | 'to_do' | 'hitl' | 'complete' | 'failed';
52
54
 
53
55
  export declare type AgentChecklistResponse = {
54
56
  invocation_id: string;
@@ -63,7 +65,7 @@ export declare type AgentDefinition = {
63
65
  description: string;
64
66
  };
65
67
 
66
- export declare const AgentMonitorKanban: ({ jwt, headers, agentDefinitionsUrl, agentsUrl, agentUrl, agentChecklistUrl, agentResourcesUrl, agentTimelineUrl, agentChatUrl, agentConversationUrl, pauseAgentUrl, resumeAgentUrl, archiveAgentUrl, unarchiveAgentUrl, enableUpload, adminMode, showHeader, institutions, usePusherToRepoll, pusherChannelPrefix, subscribeToPusher, }: AgentMonitorKanbanProps) => JSX_2.Element;
68
+ export declare const AgentMonitorKanban: ({ jwt, headers, agentDefinitionsUrl, agentsUrl, agentUrl, agentChecklistUrl, agentResourcesUrl, agentTimelineUrl, agentChatUrl, agentConversationUrl, pauseAgentUrl, resumeAgentUrl, archiveAgentUrl, unarchiveAgentUrl, enableUpload, adminMode, showHeader, institutions, usePusherToRepoll, pusherChannelPrefix, pusherKey, pusherCluster, subscribeToPusher, }: AgentMonitorKanbanProps) => JSX_2.Element;
67
69
 
68
70
  export declare type AgentMonitorKanbanProps = {
69
71
  jwt?: string;
@@ -72,9 +74,7 @@ export declare type AgentMonitorKanbanProps = {
72
74
  agentsUrl: string;
73
75
  agentUrl: string;
74
76
  agentChecklistUrl: string;
75
- /** Optional — omit when the backend has no /resources route. */
76
77
  agentResourcesUrl?: string;
77
- /** Optional — omit when the backend has no /agent-timeline route. */
78
78
  agentTimelineUrl?: string;
79
79
  agentChatUrl: string;
80
80
  agentConversationUrl: string;
@@ -88,6 +88,8 @@ export declare type AgentMonitorKanbanProps = {
88
88
  institutions?: InstitutionConfig[];
89
89
  usePusherToRepoll?: boolean;
90
90
  pusherChannelPrefix?: string;
91
+ pusherKey?: string;
92
+ pusherCluster?: string;
91
93
  subscribeToPusher?: SubscribeToPusher;
92
94
  };
93
95
 
@@ -228,7 +230,7 @@ declare type AgentTimelineScheduledRun = {
228
230
 
229
231
  declare type AgentTimelineScheduledRunRecurrence = 'one_off' | 'repeating';
230
232
 
231
- export declare const AgentView: ({ agent, invocationId, open, onClose, jwt, headers, agentUrl, agentChecklistUrl, agentResourcesUrl, agentTimelineUrl, agentChatUrl, agentConversationUrl, pauseAgentUrl, resumeAgentUrl, archiveAgentUrl, unarchiveAgentUrl, chatId, enableUpload, adminMode, initialBrief, initialPhase, initialChecklist, usePusherToRepoll, pusherChannelPrefix, subscribeToPusher, onArchived, onUnarchived, onDeleted, onAgentUpdated, }: AgentViewProps) => JSX_2.Element;
233
+ export declare const AgentView: ({ agent, invocationId, open, onClose, jwt, headers, agentUrl, agentChecklistUrl, agentResourcesUrl, agentTimelineUrl, agentChatUrl, agentConversationUrl, pauseAgentUrl, resumeAgentUrl, archiveAgentUrl, unarchiveAgentUrl, chatId, enableUpload, adminMode, initialBrief, initialPhase, initialChecklist, usePusherToRepoll, pusherChannelPrefix, pusherKey, pusherCluster, subscribeToPusher, onArchived, onUnarchived, onDeleted, onAgentUpdated, }: AgentViewProps) => JSX_2.Element;
232
234
 
233
235
  export declare type AgentViewProps = {
234
236
  agent: Agent;
@@ -259,6 +261,9 @@ export declare type AgentViewProps = {
259
261
  initialChecklist?: AgentChecklistItem[] | null;
260
262
  usePusherToRepoll?: boolean;
261
263
  pusherChannelPrefix?: string;
264
+ pusherKey?: string;
265
+ pusherCluster?: string;
266
+ /** Host-owned client. When omitted, AgentView connects with pusherKey/pusherCluster. */
262
267
  subscribeToPusher?: SubscribeToPusher;
263
268
  };
264
269
 
@@ -389,7 +394,7 @@ export declare type ApiChatStreamEvent = {
389
394
  chat_id: string;
390
395
  event_id: string;
391
396
  client_message_id: string;
392
- message: ApiChatMessage;
397
+ message: ApiChatStreamMessage;
393
398
  timestamp: string;
394
399
  is_final: boolean;
395
400
  moderation_status: string | null;
@@ -397,6 +402,12 @@ export declare type ApiChatStreamEvent = {
397
402
  meta: Record<string, unknown>;
398
403
  };
399
404
 
405
+ declare type ApiChatStreamMessage = {
406
+ role: ApiChatRole | 'tool';
407
+ content: string | null;
408
+ tool_calls?: ApiConversationToolCall[] | null;
409
+ };
410
+
400
411
  declare type ApiChecklistEndpointResponse = ApiChecklistItem[] | {
401
412
  checklist_items?: ApiChecklistItem[] | null;
402
413
  checklist?: ApiChecklistItem[] | null;
@@ -417,7 +428,7 @@ export declare type ApiChecklistItem = {
417
428
  follow_up_prompts?: string[];
418
429
  };
419
430
 
420
- export declare type ApiChecklistItemStatus = 'in_progress' | 'requires_attention' | 'failed' | 'complete' | 'available' | 'generating-a-response' | 'hitl';
431
+ export declare type ApiChecklistItemStatus = 'in_progress' | 'to_do' | 'requires_attention' | 'waiting_on_human' | 'failed' | 'complete' | 'available' | 'generating-a-response' | 'hitl';
421
432
 
422
433
  export declare type ApiConversationMessage = {
423
434
  message_id: string;
@@ -484,7 +495,9 @@ export declare const buildAgentPusherChannel: (prefix: string, agentId: string)
484
495
  export declare interface ChatConnector {
485
496
  openingMessage(): ChatMessage;
486
497
  start(brief: AgentBrief): Promise<ChatTurn>;
487
- sendMessage(text: string, uploadFiles?: File[]): Promise<ChatTurn>;
498
+ sendMessage(text: string, uploadFiles?: File[], options?: {
499
+ onThinking?: (update: ThinkingUpdate) => void;
500
+ }): Promise<ChatTurn>;
488
501
  pause(): Promise<void>;
489
502
  resume(): Promise<void>;
490
503
  seedChecklist?(checklist: AgentChecklistItem[]): void;
@@ -548,7 +561,9 @@ export declare class HttpChatConnector implements ChatConnector {
548
561
  openingMessage(): ChatMessage;
549
562
  bootstrapConversation(): Promise<ChatMessage[]>;
550
563
  start(brief: AgentBrief): Promise<ChatTurn>;
551
- sendMessage(text: string, uploadFiles?: File[]): Promise<ChatTurn>;
564
+ sendMessage(text: string, uploadFiles?: File[], options?: {
565
+ onThinking?: (update: ThinkingUpdate_2) => void;
566
+ }): Promise<ChatTurn>;
552
567
  pause(): Promise<void>;
553
568
  resume(): Promise<void>;
554
569
  seedChecklist(checklist: AgentChecklistItem[]): void;
@@ -718,6 +733,15 @@ export declare type UseAgentWorkspaceResult = {
718
733
  deleteAgent: (agentId: string) => Promise<void>;
719
734
  };
720
735
 
736
+ export declare const useSubscribeToPusher: ({ enabled, key, cluster, isAdmin, }: UseSubscribeToPusherArgs) => SubscribeToPusher | undefined;
737
+
738
+ export declare type UseSubscribeToPusherArgs = {
739
+ enabled: boolean;
740
+ key: string;
741
+ cluster: string;
742
+ isAdmin?: boolean;
743
+ };
744
+
721
745
  export declare type WorkspacePhase = 'briefing' | 'running' | 'paused' | 'complete';
722
746
 
723
747
  export { }