@prbe.ai/electron-sdk 0.1.17 → 0.1.18

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.
@@ -46,7 +46,8 @@ interface RequestPathAccessResponse {
46
46
  type InteractionResponse = AskQuestionResponse | RequestPermissionResponse | RequestPathAccessResponse;
47
47
  declare enum InvestigationSource {
48
48
  USER = "user",
49
- CONTEXT_REQUEST = "context_request"
49
+ CONTEXT_REQUEST = "context_request",
50
+ EXTERNAL_REQUEST = "external_request"
50
51
  }
51
52
  interface PRBEInteractionRequester {
52
53
  requestUserInteraction(payload: InteractionPayload): Promise<InteractionResponse>;
@@ -227,25 +228,26 @@ interface FlaggedFileIn {
227
228
  }
228
229
  interface PollRequest {
229
230
  agent_id: string;
230
- ticket_ids: string[];
231
231
  }
232
232
  interface ContextRequestOut {
233
233
  id: string;
234
234
  query: string;
235
235
  slug?: string;
236
+ ticket_id: string;
236
237
  is_active: boolean;
237
238
  created_at: string;
238
239
  }
239
- interface TicketStatusOut {
240
- ticket_id: string;
241
- status: string;
242
- context_requests: ContextRequestOut[];
240
+ interface ExternalRequestOut {
241
+ id: string;
242
+ query: string;
243
+ source: string;
244
+ source_detail?: string;
245
+ is_active: boolean;
246
+ created_at: string;
243
247
  }
244
248
  interface PollResponse {
245
- tickets: TicketStatusOut[];
246
- }
247
- interface TicketInfoRequest {
248
- ticket_ids: string[];
249
+ context_requests: ContextRequestOut[];
250
+ external_requests: ExternalRequestOut[];
249
251
  }
250
252
  interface TicketInfoOut {
251
253
  ticket_id: string;
@@ -255,8 +257,25 @@ interface TicketInfoOut {
255
257
  description?: string;
256
258
  session_count: number;
257
259
  }
258
- interface TicketInfoResponse {
259
- tickets: TicketInfoOut[];
260
+ interface AgentHistoryRequest {
261
+ agent_id: string;
262
+ }
263
+ interface AgentSessionOut {
264
+ session_id: string;
265
+ title: string;
266
+ status: string;
267
+ context_summary?: string;
268
+ created_at: string;
269
+ }
270
+ interface AgentTicketOut {
271
+ ticket_id: string;
272
+ title: string;
273
+ status: string;
274
+ priority?: string;
275
+ sessions: AgentSessionOut[];
276
+ }
277
+ interface AgentHistoryResponse {
278
+ tickets: AgentTicketOut[];
260
279
  }
261
280
  interface PRBEStatusEvent {
262
281
  id: string;
@@ -265,11 +284,13 @@ interface PRBEStatusEvent {
265
284
  isCompleted: boolean;
266
285
  isExpanded: boolean;
267
286
  }
268
- interface PRBECRInvestigation {
287
+ interface PRBEBackgroundInvestigation {
269
288
  id: string;
270
289
  query: string;
271
290
  slug?: string;
272
291
  ticketId?: string;
292
+ source?: string;
293
+ sourceDetail?: string;
273
294
  events: PRBEStatusEvent[];
274
295
  isRunning: boolean;
275
296
  isCompleted: boolean;
@@ -281,6 +302,7 @@ interface PRBECRInvestigation {
281
302
  startedAt: Date;
282
303
  pendingInteraction?: InteractionPayload;
283
304
  resolvedInteractions?: ResolvedInteraction[];
305
+ conversationHistory: ConversationEntry[];
284
306
  }
285
307
  interface PRBECompletedInvestigation {
286
308
  id: string;
@@ -293,18 +315,6 @@ interface PRBECompletedInvestigation {
293
315
  conversationHistory?: ConversationEntry[];
294
316
  completedAt: Date;
295
317
  }
296
- interface ResolveSessionsRequest {
297
- agent_id: string;
298
- session_ids: string[];
299
- }
300
- interface ResolvedTicketOut {
301
- ticket_id: string;
302
- status: string;
303
- session_ids: string[];
304
- }
305
- interface ResolveSessionsResponse {
306
- tickets: ResolvedTicketOut[];
307
- }
308
318
  declare enum PRBEAgentErrorType {
309
319
  SERVER_ERROR = "server_error",
310
320
  NETWORK_ERROR = "network_error",
@@ -336,10 +346,10 @@ declare enum PRBEStateEvent {
336
346
  COMPLETE = "complete",
337
347
  /** Emitted on error. Payload: { message: string } */
338
348
  ERROR = "error",
339
- /** Emitted when a background CR starts. Payload: PRBECRInvestigation */
340
- CR_START = "cr-start",
341
- /** Emitted when a background CR completes/fails. Payload: PRBECRInvestigation */
342
- CR_COMPLETE = "cr-complete",
349
+ /** Emitted when a background investigation starts. Payload: PRBEBackgroundInvestigation */
350
+ BACKGROUND_START = "background-start",
351
+ /** Emitted when a background investigation completes/fails. Payload: PRBEBackgroundInvestigation */
352
+ BACKGROUND_COMPLETE = "background-complete",
343
353
  /** Emitted when tracked ticket IDs change. Payload: string[] */
344
354
  TICKETS_CHANGED = "tickets-changed",
345
355
  /** Emitted when ticket info is updated. Payload: TicketInfoOut[] */
@@ -363,15 +373,17 @@ declare class PRBEAgentState extends EventEmitter {
363
373
  agentMessage?: string;
364
374
  conversationHistory: ConversationEntry[];
365
375
  completedInvestigations: PRBECompletedInvestigation[];
366
- activeCRs: Map<string, PRBECRInvestigation>;
367
- completedCRs: PRBECRInvestigation[];
376
+ activeBackgroundInvestigations: Map<string, PRBEBackgroundInvestigation>;
377
+ completedBackgroundInvestigations: PRBEBackgroundInvestigation[];
368
378
  trackedSessionIDs: string[];
369
379
  ticketInfo: TicketInfoOut[];
380
+ agentHistory: AgentTicketOut[];
370
381
  get hasActiveWork(): boolean;
371
- get activeCRCount(): number;
382
+ get activeBackgroundCount(): number;
372
383
  get isActive(): boolean;
373
384
  beginInvestigation(query: string): void;
374
385
  appendConversation(entry: ConversationEntry): void;
386
+ appendBackgroundConversation(backgroundId: string, entry: ConversationEntry): void;
375
387
  resetInvestigation(): void;
376
388
  appendEvent(label: string, detail?: string, completed?: boolean): void;
377
389
  attachObservation(text: string): void;
@@ -379,20 +391,21 @@ declare class PRBEAgentState extends EventEmitter {
379
391
  failInvestigation(message: string): void;
380
392
  setPendingInteraction(payload: InteractionPayload): void;
381
393
  clearPendingInteraction(): void;
382
- setCRPendingInteraction(crID: string, payload: InteractionPayload): void;
383
- clearCRPendingInteraction(crID: string): void;
394
+ setBackgroundPendingInteraction(backgroundId: string, payload: InteractionPayload): void;
395
+ clearBackgroundPendingInteraction(backgroundId: string): void;
384
396
  resolveInteraction(response: InteractionResponse): void;
385
- resolveCRInteraction(crID: string, response: InteractionResponse): void;
397
+ resolveBackgroundInteraction(backgroundId: string, response: InteractionResponse): void;
386
398
  setAgentMessage(message: string): void;
387
- setCRAgentMessage(crID: string, message: string): void;
399
+ setBackgroundAgentMessage(backgroundId: string, message: string): void;
388
400
  toggleExpansion(eventId: string): void;
389
- beginCR(id: string, query: string, slug?: string, ticketId?: string): void;
390
- appendCREvent(crID: string, label: string, detail?: string, completed?: boolean): void;
391
- attachCRObservation(crID: string, text: string): void;
392
- completeCR(id: string, report: string): void;
393
- failCR(id: string, message: string): void;
401
+ beginBackgroundInvestigation(id: string, query: string, slug?: string, ticketId?: string, source?: string, sourceDetail?: string): void;
402
+ appendBackgroundEvent(backgroundId: string, label: string, detail?: string, completed?: boolean): void;
403
+ attachBackgroundObservation(backgroundId: string, text: string): void;
404
+ completeBackgroundInvestigation(id: string, report: string): void;
405
+ failBackgroundInvestigation(id: string, message: string): void;
394
406
  updateTrackedSessionIDs(ids: string[]): void;
395
407
  updateTicketInfo(info: TicketInfoOut[]): void;
408
+ updateAgentHistory(tickets: AgentTicketOut[]): void;
396
409
  }
397
410
 
398
411
  /**
@@ -402,11 +415,13 @@ declare class PRBEAgentState extends EventEmitter {
402
415
  * plain JSON-safe objects suitable for IPC or structured clone.
403
416
  */
404
417
 
405
- interface PRBESerializedCR {
418
+ interface PRBESerializedBackgroundInvestigation {
406
419
  id: string;
407
420
  query: string;
408
421
  slug?: string;
409
422
  ticketId?: string;
423
+ source?: string;
424
+ sourceDetail?: string;
410
425
  events: PRBEStatusEvent[];
411
426
  isRunning: boolean;
412
427
  isCompleted: boolean;
@@ -418,6 +433,7 @@ interface PRBESerializedCR {
418
433
  startedAt: string;
419
434
  pendingInteraction?: InteractionPayload;
420
435
  resolvedInteractions?: ResolvedInteraction[];
436
+ conversationHistory: ConversationEntry[];
421
437
  }
422
438
  type PRBESerializedTicket = TicketInfoOut;
423
439
  interface PRBESerializedCompletedInvestigation {
@@ -443,13 +459,13 @@ interface PRBESerializedState {
443
459
  agentMessage?: string;
444
460
  conversationHistory: ConversationEntry[];
445
461
  completedInvestigations: PRBESerializedCompletedInvestigation[];
446
- activeCRs: PRBESerializedCR[];
447
- completedCRs: PRBESerializedCR[];
448
- trackedSessionIDs: string[];
462
+ activeBackgroundInvestigations: PRBESerializedBackgroundInvestigation[];
463
+ completedBackgroundInvestigations: PRBESerializedBackgroundInvestigation[];
449
464
  ticketInfo: PRBESerializedTicket[];
465
+ agentHistory: AgentTicketOut[];
450
466
  hasActiveWork: boolean;
451
467
  }
452
468
  declare const DEFAULT_PRBE_STATE: PRBESerializedState;
453
469
  declare function serializePRBEState(state: PRBEAgentState): PRBESerializedState;
454
470
 
455
- export { serializePRBEState as $, API_URL as A, type PRBEStatusEvent as B, type ContextRequestOut as C, DEFAULT_PRBE_STATE as D, type PollRequest as E, type FlaggedFileIn as F, type RequestPathAccessResponse as G, type RequestPermissionPayload as H, InvestigationSource as I, type RequestPermissionResponse as J, type ResolveSessionsRequest as K, type ResolveSessionsResponse as L, MIDDLEWARE_URL as M, type ResolvedInteraction as N, type ResolvedTicketOut as O, type PRBEToolDeclaration as P, type TicketInfoRequest as Q, type RequestPathAccessPayload as R, type TicketInfoResponse as S, type TicketInfoOut as T, UserIdentifierType as U, type TicketStatusOut as V, ToolName as W, ToolParamType as X, type WSMessage as Y, WSMessageType as Z, redactPII as _, type PRBEToolParameter as a, type PRBEInteractionRequester as b, PRBEAgentState as c, type PRBEAgentConfig as d, type InteractionPayload as e, type InteractionResponse as f, type PollResponse as g, type AskQuestionPayload as h, type AskQuestionResponse as i, type ConversationEntry as j, ConversationRole as k, InteractionType as l, type InvestigationResult as m, PRBEAgentConfigKey as n, PRBEAgentError as o, PRBEAgentErrorType as p, type PRBEAgentStatus as q, PRBEAgentStatusType as r, type PRBECRInvestigation as s, type PRBECompletedInvestigation as t, type PRBEInteractionHandler as u, type PRBESerializedCR as v, type PRBESerializedCompletedInvestigation as w, type PRBESerializedState as x, type PRBESerializedTicket as y, PRBEStateEvent as z };
471
+ export { type AgentHistoryResponse as A, type PRBESerializedCompletedInvestigation as B, type ContextRequestOut as C, DEFAULT_PRBE_STATE as D, type ExternalRequestOut as E, type FlaggedFileIn as F, type PRBESerializedState as G, type PRBESerializedTicket as H, InvestigationSource as I, PRBEStateEvent as J, type PRBEStatusEvent as K, type PollRequest as L, MIDDLEWARE_URL as M, type RequestPathAccessResponse as N, type RequestPermissionPayload as O, type PRBEToolDeclaration as P, type RequestPermissionResponse as Q, type RequestPathAccessPayload as R, type ResolvedInteraction as S, type TicketInfoOut as T, UserIdentifierType as U, ToolName as V, ToolParamType as W, type WSMessage as X, WSMessageType as Y, redactPII as Z, serializePRBEState as _, type PRBEToolParameter as a, type PRBEInteractionRequester as b, PRBEAgentState as c, type PRBEAgentConfig as d, type InteractionPayload as e, type InteractionResponse as f, type PollResponse as g, API_URL as h, type AgentHistoryRequest as i, type AgentSessionOut as j, type AgentTicketOut as k, type AskQuestionPayload as l, type AskQuestionResponse as m, type ConversationEntry as n, ConversationRole as o, InteractionType as p, type InvestigationResult as q, PRBEAgentConfigKey as r, PRBEAgentError as s, PRBEAgentErrorType as t, type PRBEAgentStatus as u, PRBEAgentStatusType as v, type PRBEBackgroundInvestigation as w, type PRBECompletedInvestigation as x, type PRBEInteractionHandler as y, type PRBESerializedBackgroundInvestigation as z };
@@ -46,7 +46,8 @@ interface RequestPathAccessResponse {
46
46
  type InteractionResponse = AskQuestionResponse | RequestPermissionResponse | RequestPathAccessResponse;
47
47
  declare enum InvestigationSource {
48
48
  USER = "user",
49
- CONTEXT_REQUEST = "context_request"
49
+ CONTEXT_REQUEST = "context_request",
50
+ EXTERNAL_REQUEST = "external_request"
50
51
  }
51
52
  interface PRBEInteractionRequester {
52
53
  requestUserInteraction(payload: InteractionPayload): Promise<InteractionResponse>;
@@ -227,25 +228,26 @@ interface FlaggedFileIn {
227
228
  }
228
229
  interface PollRequest {
229
230
  agent_id: string;
230
- ticket_ids: string[];
231
231
  }
232
232
  interface ContextRequestOut {
233
233
  id: string;
234
234
  query: string;
235
235
  slug?: string;
236
+ ticket_id: string;
236
237
  is_active: boolean;
237
238
  created_at: string;
238
239
  }
239
- interface TicketStatusOut {
240
- ticket_id: string;
241
- status: string;
242
- context_requests: ContextRequestOut[];
240
+ interface ExternalRequestOut {
241
+ id: string;
242
+ query: string;
243
+ source: string;
244
+ source_detail?: string;
245
+ is_active: boolean;
246
+ created_at: string;
243
247
  }
244
248
  interface PollResponse {
245
- tickets: TicketStatusOut[];
246
- }
247
- interface TicketInfoRequest {
248
- ticket_ids: string[];
249
+ context_requests: ContextRequestOut[];
250
+ external_requests: ExternalRequestOut[];
249
251
  }
250
252
  interface TicketInfoOut {
251
253
  ticket_id: string;
@@ -255,8 +257,25 @@ interface TicketInfoOut {
255
257
  description?: string;
256
258
  session_count: number;
257
259
  }
258
- interface TicketInfoResponse {
259
- tickets: TicketInfoOut[];
260
+ interface AgentHistoryRequest {
261
+ agent_id: string;
262
+ }
263
+ interface AgentSessionOut {
264
+ session_id: string;
265
+ title: string;
266
+ status: string;
267
+ context_summary?: string;
268
+ created_at: string;
269
+ }
270
+ interface AgentTicketOut {
271
+ ticket_id: string;
272
+ title: string;
273
+ status: string;
274
+ priority?: string;
275
+ sessions: AgentSessionOut[];
276
+ }
277
+ interface AgentHistoryResponse {
278
+ tickets: AgentTicketOut[];
260
279
  }
261
280
  interface PRBEStatusEvent {
262
281
  id: string;
@@ -265,11 +284,13 @@ interface PRBEStatusEvent {
265
284
  isCompleted: boolean;
266
285
  isExpanded: boolean;
267
286
  }
268
- interface PRBECRInvestigation {
287
+ interface PRBEBackgroundInvestigation {
269
288
  id: string;
270
289
  query: string;
271
290
  slug?: string;
272
291
  ticketId?: string;
292
+ source?: string;
293
+ sourceDetail?: string;
273
294
  events: PRBEStatusEvent[];
274
295
  isRunning: boolean;
275
296
  isCompleted: boolean;
@@ -281,6 +302,7 @@ interface PRBECRInvestigation {
281
302
  startedAt: Date;
282
303
  pendingInteraction?: InteractionPayload;
283
304
  resolvedInteractions?: ResolvedInteraction[];
305
+ conversationHistory: ConversationEntry[];
284
306
  }
285
307
  interface PRBECompletedInvestigation {
286
308
  id: string;
@@ -293,18 +315,6 @@ interface PRBECompletedInvestigation {
293
315
  conversationHistory?: ConversationEntry[];
294
316
  completedAt: Date;
295
317
  }
296
- interface ResolveSessionsRequest {
297
- agent_id: string;
298
- session_ids: string[];
299
- }
300
- interface ResolvedTicketOut {
301
- ticket_id: string;
302
- status: string;
303
- session_ids: string[];
304
- }
305
- interface ResolveSessionsResponse {
306
- tickets: ResolvedTicketOut[];
307
- }
308
318
  declare enum PRBEAgentErrorType {
309
319
  SERVER_ERROR = "server_error",
310
320
  NETWORK_ERROR = "network_error",
@@ -336,10 +346,10 @@ declare enum PRBEStateEvent {
336
346
  COMPLETE = "complete",
337
347
  /** Emitted on error. Payload: { message: string } */
338
348
  ERROR = "error",
339
- /** Emitted when a background CR starts. Payload: PRBECRInvestigation */
340
- CR_START = "cr-start",
341
- /** Emitted when a background CR completes/fails. Payload: PRBECRInvestigation */
342
- CR_COMPLETE = "cr-complete",
349
+ /** Emitted when a background investigation starts. Payload: PRBEBackgroundInvestigation */
350
+ BACKGROUND_START = "background-start",
351
+ /** Emitted when a background investigation completes/fails. Payload: PRBEBackgroundInvestigation */
352
+ BACKGROUND_COMPLETE = "background-complete",
343
353
  /** Emitted when tracked ticket IDs change. Payload: string[] */
344
354
  TICKETS_CHANGED = "tickets-changed",
345
355
  /** Emitted when ticket info is updated. Payload: TicketInfoOut[] */
@@ -363,15 +373,17 @@ declare class PRBEAgentState extends EventEmitter {
363
373
  agentMessage?: string;
364
374
  conversationHistory: ConversationEntry[];
365
375
  completedInvestigations: PRBECompletedInvestigation[];
366
- activeCRs: Map<string, PRBECRInvestigation>;
367
- completedCRs: PRBECRInvestigation[];
376
+ activeBackgroundInvestigations: Map<string, PRBEBackgroundInvestigation>;
377
+ completedBackgroundInvestigations: PRBEBackgroundInvestigation[];
368
378
  trackedSessionIDs: string[];
369
379
  ticketInfo: TicketInfoOut[];
380
+ agentHistory: AgentTicketOut[];
370
381
  get hasActiveWork(): boolean;
371
- get activeCRCount(): number;
382
+ get activeBackgroundCount(): number;
372
383
  get isActive(): boolean;
373
384
  beginInvestigation(query: string): void;
374
385
  appendConversation(entry: ConversationEntry): void;
386
+ appendBackgroundConversation(backgroundId: string, entry: ConversationEntry): void;
375
387
  resetInvestigation(): void;
376
388
  appendEvent(label: string, detail?: string, completed?: boolean): void;
377
389
  attachObservation(text: string): void;
@@ -379,20 +391,21 @@ declare class PRBEAgentState extends EventEmitter {
379
391
  failInvestigation(message: string): void;
380
392
  setPendingInteraction(payload: InteractionPayload): void;
381
393
  clearPendingInteraction(): void;
382
- setCRPendingInteraction(crID: string, payload: InteractionPayload): void;
383
- clearCRPendingInteraction(crID: string): void;
394
+ setBackgroundPendingInteraction(backgroundId: string, payload: InteractionPayload): void;
395
+ clearBackgroundPendingInteraction(backgroundId: string): void;
384
396
  resolveInteraction(response: InteractionResponse): void;
385
- resolveCRInteraction(crID: string, response: InteractionResponse): void;
397
+ resolveBackgroundInteraction(backgroundId: string, response: InteractionResponse): void;
386
398
  setAgentMessage(message: string): void;
387
- setCRAgentMessage(crID: string, message: string): void;
399
+ setBackgroundAgentMessage(backgroundId: string, message: string): void;
388
400
  toggleExpansion(eventId: string): void;
389
- beginCR(id: string, query: string, slug?: string, ticketId?: string): void;
390
- appendCREvent(crID: string, label: string, detail?: string, completed?: boolean): void;
391
- attachCRObservation(crID: string, text: string): void;
392
- completeCR(id: string, report: string): void;
393
- failCR(id: string, message: string): void;
401
+ beginBackgroundInvestigation(id: string, query: string, slug?: string, ticketId?: string, source?: string, sourceDetail?: string): void;
402
+ appendBackgroundEvent(backgroundId: string, label: string, detail?: string, completed?: boolean): void;
403
+ attachBackgroundObservation(backgroundId: string, text: string): void;
404
+ completeBackgroundInvestigation(id: string, report: string): void;
405
+ failBackgroundInvestigation(id: string, message: string): void;
394
406
  updateTrackedSessionIDs(ids: string[]): void;
395
407
  updateTicketInfo(info: TicketInfoOut[]): void;
408
+ updateAgentHistory(tickets: AgentTicketOut[]): void;
396
409
  }
397
410
 
398
411
  /**
@@ -402,11 +415,13 @@ declare class PRBEAgentState extends EventEmitter {
402
415
  * plain JSON-safe objects suitable for IPC or structured clone.
403
416
  */
404
417
 
405
- interface PRBESerializedCR {
418
+ interface PRBESerializedBackgroundInvestigation {
406
419
  id: string;
407
420
  query: string;
408
421
  slug?: string;
409
422
  ticketId?: string;
423
+ source?: string;
424
+ sourceDetail?: string;
410
425
  events: PRBEStatusEvent[];
411
426
  isRunning: boolean;
412
427
  isCompleted: boolean;
@@ -418,6 +433,7 @@ interface PRBESerializedCR {
418
433
  startedAt: string;
419
434
  pendingInteraction?: InteractionPayload;
420
435
  resolvedInteractions?: ResolvedInteraction[];
436
+ conversationHistory: ConversationEntry[];
421
437
  }
422
438
  type PRBESerializedTicket = TicketInfoOut;
423
439
  interface PRBESerializedCompletedInvestigation {
@@ -443,13 +459,13 @@ interface PRBESerializedState {
443
459
  agentMessage?: string;
444
460
  conversationHistory: ConversationEntry[];
445
461
  completedInvestigations: PRBESerializedCompletedInvestigation[];
446
- activeCRs: PRBESerializedCR[];
447
- completedCRs: PRBESerializedCR[];
448
- trackedSessionIDs: string[];
462
+ activeBackgroundInvestigations: PRBESerializedBackgroundInvestigation[];
463
+ completedBackgroundInvestigations: PRBESerializedBackgroundInvestigation[];
449
464
  ticketInfo: PRBESerializedTicket[];
465
+ agentHistory: AgentTicketOut[];
450
466
  hasActiveWork: boolean;
451
467
  }
452
468
  declare const DEFAULT_PRBE_STATE: PRBESerializedState;
453
469
  declare function serializePRBEState(state: PRBEAgentState): PRBESerializedState;
454
470
 
455
- export { serializePRBEState as $, API_URL as A, type PRBEStatusEvent as B, type ContextRequestOut as C, DEFAULT_PRBE_STATE as D, type PollRequest as E, type FlaggedFileIn as F, type RequestPathAccessResponse as G, type RequestPermissionPayload as H, InvestigationSource as I, type RequestPermissionResponse as J, type ResolveSessionsRequest as K, type ResolveSessionsResponse as L, MIDDLEWARE_URL as M, type ResolvedInteraction as N, type ResolvedTicketOut as O, type PRBEToolDeclaration as P, type TicketInfoRequest as Q, type RequestPathAccessPayload as R, type TicketInfoResponse as S, type TicketInfoOut as T, UserIdentifierType as U, type TicketStatusOut as V, ToolName as W, ToolParamType as X, type WSMessage as Y, WSMessageType as Z, redactPII as _, type PRBEToolParameter as a, type PRBEInteractionRequester as b, PRBEAgentState as c, type PRBEAgentConfig as d, type InteractionPayload as e, type InteractionResponse as f, type PollResponse as g, type AskQuestionPayload as h, type AskQuestionResponse as i, type ConversationEntry as j, ConversationRole as k, InteractionType as l, type InvestigationResult as m, PRBEAgentConfigKey as n, PRBEAgentError as o, PRBEAgentErrorType as p, type PRBEAgentStatus as q, PRBEAgentStatusType as r, type PRBECRInvestigation as s, type PRBECompletedInvestigation as t, type PRBEInteractionHandler as u, type PRBESerializedCR as v, type PRBESerializedCompletedInvestigation as w, type PRBESerializedState as x, type PRBESerializedTicket as y, PRBEStateEvent as z };
471
+ export { type AgentHistoryResponse as A, type PRBESerializedCompletedInvestigation as B, type ContextRequestOut as C, DEFAULT_PRBE_STATE as D, type ExternalRequestOut as E, type FlaggedFileIn as F, type PRBESerializedState as G, type PRBESerializedTicket as H, InvestigationSource as I, PRBEStateEvent as J, type PRBEStatusEvent as K, type PollRequest as L, MIDDLEWARE_URL as M, type RequestPathAccessResponse as N, type RequestPermissionPayload as O, type PRBEToolDeclaration as P, type RequestPermissionResponse as Q, type RequestPathAccessPayload as R, type ResolvedInteraction as S, type TicketInfoOut as T, UserIdentifierType as U, ToolName as V, ToolParamType as W, type WSMessage as X, WSMessageType as Y, redactPII as Z, serializePRBEState as _, type PRBEToolParameter as a, type PRBEInteractionRequester as b, PRBEAgentState as c, type PRBEAgentConfig as d, type InteractionPayload as e, type InteractionResponse as f, type PollResponse as g, API_URL as h, type AgentHistoryRequest as i, type AgentSessionOut as j, type AgentTicketOut as k, type AskQuestionPayload as l, type AskQuestionResponse as m, type ConversationEntry as n, ConversationRole as o, InteractionType as p, type InvestigationResult as q, PRBEAgentConfigKey as r, PRBEAgentError as s, PRBEAgentErrorType as t, type PRBEAgentStatus as u, PRBEAgentStatusType as v, type PRBEBackgroundInvestigation as w, type PRBECompletedInvestigation as x, type PRBEInteractionHandler as y, type PRBESerializedBackgroundInvestigation as z };
package/dist/types.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export { A as API_URL, h as AskQuestionPayload, i as AskQuestionResponse, C as ContextRequestOut, D as DEFAULT_PRBE_STATE, F as FlaggedFileIn, e as InteractionPayload, f as InteractionResponse, l as InteractionType, m as InvestigationResult, M as MIDDLEWARE_URL, d as PRBEAgentConfig, n as PRBEAgentConfigKey, p as PRBEAgentErrorType, q as PRBEAgentStatus, r as PRBEAgentStatusType, s as PRBECRInvestigation, t as PRBECompletedInvestigation, u as PRBEInteractionHandler, b as PRBEInteractionRequester, v as PRBESerializedCR, w as PRBESerializedCompletedInvestigation, x as PRBESerializedState, y as PRBESerializedTicket, z as PRBEStateEvent, B as PRBEStatusEvent, P as PRBEToolDeclaration, a as PRBEToolParameter, E as PollRequest, g as PollResponse, R as RequestPathAccessPayload, G as RequestPathAccessResponse, H as RequestPermissionPayload, J as RequestPermissionResponse, N as ResolvedInteraction, T as TicketInfoOut, Q as TicketInfoRequest, S as TicketInfoResponse, V as TicketStatusOut, W as ToolName, X as ToolParamType, Y as WSMessage, Z as WSMessageType } from './types-BmH_CmsO.mjs';
1
+ export { h as API_URL, i as AgentHistoryRequest, A as AgentHistoryResponse, j as AgentSessionOut, k as AgentTicketOut, l as AskQuestionPayload, m as AskQuestionResponse, C as ContextRequestOut, D as DEFAULT_PRBE_STATE, E as ExternalRequestOut, F as FlaggedFileIn, e as InteractionPayload, f as InteractionResponse, p as InteractionType, q as InvestigationResult, M as MIDDLEWARE_URL, d as PRBEAgentConfig, r as PRBEAgentConfigKey, t as PRBEAgentErrorType, u as PRBEAgentStatus, v as PRBEAgentStatusType, w as PRBEBackgroundInvestigation, x as PRBECompletedInvestigation, y as PRBEInteractionHandler, b as PRBEInteractionRequester, z as PRBESerializedBackgroundInvestigation, B as PRBESerializedCompletedInvestigation, G as PRBESerializedState, H as PRBESerializedTicket, J as PRBEStateEvent, K as PRBEStatusEvent, P as PRBEToolDeclaration, a as PRBEToolParameter, L as PollRequest, g as PollResponse, R as RequestPathAccessPayload, N as RequestPathAccessResponse, O as RequestPermissionPayload, Q as RequestPermissionResponse, S as ResolvedInteraction, T as TicketInfoOut, V as ToolName, W as ToolParamType, X as WSMessage, Y as WSMessageType } from './types-BeZ2nQ9x.mjs';
2
2
  import 'events';
package/dist/types.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { A as API_URL, h as AskQuestionPayload, i as AskQuestionResponse, C as ContextRequestOut, D as DEFAULT_PRBE_STATE, F as FlaggedFileIn, e as InteractionPayload, f as InteractionResponse, l as InteractionType, m as InvestigationResult, M as MIDDLEWARE_URL, d as PRBEAgentConfig, n as PRBEAgentConfigKey, p as PRBEAgentErrorType, q as PRBEAgentStatus, r as PRBEAgentStatusType, s as PRBECRInvestigation, t as PRBECompletedInvestigation, u as PRBEInteractionHandler, b as PRBEInteractionRequester, v as PRBESerializedCR, w as PRBESerializedCompletedInvestigation, x as PRBESerializedState, y as PRBESerializedTicket, z as PRBEStateEvent, B as PRBEStatusEvent, P as PRBEToolDeclaration, a as PRBEToolParameter, E as PollRequest, g as PollResponse, R as RequestPathAccessPayload, G as RequestPathAccessResponse, H as RequestPermissionPayload, J as RequestPermissionResponse, N as ResolvedInteraction, T as TicketInfoOut, Q as TicketInfoRequest, S as TicketInfoResponse, V as TicketStatusOut, W as ToolName, X as ToolParamType, Y as WSMessage, Z as WSMessageType } from './types-BmH_CmsO.js';
1
+ export { h as API_URL, i as AgentHistoryRequest, A as AgentHistoryResponse, j as AgentSessionOut, k as AgentTicketOut, l as AskQuestionPayload, m as AskQuestionResponse, C as ContextRequestOut, D as DEFAULT_PRBE_STATE, E as ExternalRequestOut, F as FlaggedFileIn, e as InteractionPayload, f as InteractionResponse, p as InteractionType, q as InvestigationResult, M as MIDDLEWARE_URL, d as PRBEAgentConfig, r as PRBEAgentConfigKey, t as PRBEAgentErrorType, u as PRBEAgentStatus, v as PRBEAgentStatusType, w as PRBEBackgroundInvestigation, x as PRBECompletedInvestigation, y as PRBEInteractionHandler, b as PRBEInteractionRequester, z as PRBESerializedBackgroundInvestigation, B as PRBESerializedCompletedInvestigation, G as PRBESerializedState, H as PRBESerializedTicket, J as PRBEStateEvent, K as PRBEStatusEvent, P as PRBEToolDeclaration, a as PRBEToolParameter, L as PollRequest, g as PollResponse, R as RequestPathAccessPayload, N as RequestPathAccessResponse, O as RequestPermissionPayload, Q as RequestPermissionResponse, S as ResolvedInteraction, T as TicketInfoOut, V as ToolName, W as ToolParamType, X as WSMessage, Y as WSMessageType } from './types-BeZ2nQ9x.js';
2
2
  import 'events';
package/dist/types.js CHANGED
@@ -129,10 +129,10 @@ var DEFAULT_PRBE_STATE = {
129
129
  resolvedInteractions: [],
130
130
  conversationHistory: [],
131
131
  completedInvestigations: [],
132
- activeCRs: [],
133
- completedCRs: [],
134
- trackedSessionIDs: [],
132
+ activeBackgroundInvestigations: [],
133
+ completedBackgroundInvestigations: [],
135
134
  ticketInfo: [],
135
+ agentHistory: [],
136
136
  hasActiveWork: false
137
137
  };
138
138
 
@@ -142,8 +142,8 @@ var PRBEStateEvent = /* @__PURE__ */ ((PRBEStateEvent2) => {
142
142
  PRBEStateEvent2["EVENT"] = "event";
143
143
  PRBEStateEvent2["COMPLETE"] = "complete";
144
144
  PRBEStateEvent2["ERROR"] = "error";
145
- PRBEStateEvent2["CR_START"] = "cr-start";
146
- PRBEStateEvent2["CR_COMPLETE"] = "cr-complete";
145
+ PRBEStateEvent2["BACKGROUND_START"] = "background-start";
146
+ PRBEStateEvent2["BACKGROUND_COMPLETE"] = "background-complete";
147
147
  PRBEStateEvent2["TICKETS_CHANGED"] = "tickets-changed";
148
148
  PRBEStateEvent2["TICKET_INFO"] = "ticket-info";
149
149
  PRBEStateEvent2["INTERACTION_REQUESTED"] = "interaction-requested";