@prbe.ai/electron-sdk 0.1.16 → 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>;
@@ -136,6 +137,10 @@ declare enum ToolName {
136
137
  CLIENT_BASH_EXECUTE = "client_bash_execute",
137
138
  CLIENT_MESSAGE_USER = "client_message_user"
138
139
  }
140
+ declare enum UserIdentifierType {
141
+ EMAIL = "email",
142
+ ID = "id"
143
+ }
139
144
  declare enum PRBEAgentConfigKey {
140
145
  API_KEY = "apiKey",
141
146
  AUTO_APPROVED_DIRS = "autoApprovedDirs",
@@ -223,25 +228,26 @@ interface FlaggedFileIn {
223
228
  }
224
229
  interface PollRequest {
225
230
  agent_id: string;
226
- ticket_ids: string[];
227
231
  }
228
232
  interface ContextRequestOut {
229
233
  id: string;
230
234
  query: string;
231
235
  slug?: string;
236
+ ticket_id: string;
232
237
  is_active: boolean;
233
238
  created_at: string;
234
239
  }
235
- interface TicketStatusOut {
236
- ticket_id: string;
237
- status: string;
238
- 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;
239
247
  }
240
248
  interface PollResponse {
241
- tickets: TicketStatusOut[];
242
- }
243
- interface TicketInfoRequest {
244
- ticket_ids: string[];
249
+ context_requests: ContextRequestOut[];
250
+ external_requests: ExternalRequestOut[];
245
251
  }
246
252
  interface TicketInfoOut {
247
253
  ticket_id: string;
@@ -251,8 +257,25 @@ interface TicketInfoOut {
251
257
  description?: string;
252
258
  session_count: number;
253
259
  }
254
- interface TicketInfoResponse {
255
- 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[];
256
279
  }
257
280
  interface PRBEStatusEvent {
258
281
  id: string;
@@ -261,11 +284,13 @@ interface PRBEStatusEvent {
261
284
  isCompleted: boolean;
262
285
  isExpanded: boolean;
263
286
  }
264
- interface PRBECRInvestigation {
287
+ interface PRBEBackgroundInvestigation {
265
288
  id: string;
266
289
  query: string;
267
290
  slug?: string;
268
291
  ticketId?: string;
292
+ source?: string;
293
+ sourceDetail?: string;
269
294
  events: PRBEStatusEvent[];
270
295
  isRunning: boolean;
271
296
  isCompleted: boolean;
@@ -277,6 +302,7 @@ interface PRBECRInvestigation {
277
302
  startedAt: Date;
278
303
  pendingInteraction?: InteractionPayload;
279
304
  resolvedInteractions?: ResolvedInteraction[];
305
+ conversationHistory: ConversationEntry[];
280
306
  }
281
307
  interface PRBECompletedInvestigation {
282
308
  id: string;
@@ -289,18 +315,6 @@ interface PRBECompletedInvestigation {
289
315
  conversationHistory?: ConversationEntry[];
290
316
  completedAt: Date;
291
317
  }
292
- interface ResolveSessionsRequest {
293
- agent_id: string;
294
- session_ids: string[];
295
- }
296
- interface ResolvedTicketOut {
297
- ticket_id: string;
298
- status: string;
299
- session_ids: string[];
300
- }
301
- interface ResolveSessionsResponse {
302
- tickets: ResolvedTicketOut[];
303
- }
304
318
  declare enum PRBEAgentErrorType {
305
319
  SERVER_ERROR = "server_error",
306
320
  NETWORK_ERROR = "network_error",
@@ -332,10 +346,10 @@ declare enum PRBEStateEvent {
332
346
  COMPLETE = "complete",
333
347
  /** Emitted on error. Payload: { message: string } */
334
348
  ERROR = "error",
335
- /** Emitted when a background CR starts. Payload: PRBECRInvestigation */
336
- CR_START = "cr-start",
337
- /** Emitted when a background CR completes/fails. Payload: PRBECRInvestigation */
338
- 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",
339
353
  /** Emitted when tracked ticket IDs change. Payload: string[] */
340
354
  TICKETS_CHANGED = "tickets-changed",
341
355
  /** Emitted when ticket info is updated. Payload: TicketInfoOut[] */
@@ -359,15 +373,17 @@ declare class PRBEAgentState extends EventEmitter {
359
373
  agentMessage?: string;
360
374
  conversationHistory: ConversationEntry[];
361
375
  completedInvestigations: PRBECompletedInvestigation[];
362
- activeCRs: Map<string, PRBECRInvestigation>;
363
- completedCRs: PRBECRInvestigation[];
376
+ activeBackgroundInvestigations: Map<string, PRBEBackgroundInvestigation>;
377
+ completedBackgroundInvestigations: PRBEBackgroundInvestigation[];
364
378
  trackedSessionIDs: string[];
365
379
  ticketInfo: TicketInfoOut[];
380
+ agentHistory: AgentTicketOut[];
366
381
  get hasActiveWork(): boolean;
367
- get activeCRCount(): number;
382
+ get activeBackgroundCount(): number;
368
383
  get isActive(): boolean;
369
384
  beginInvestigation(query: string): void;
370
385
  appendConversation(entry: ConversationEntry): void;
386
+ appendBackgroundConversation(backgroundId: string, entry: ConversationEntry): void;
371
387
  resetInvestigation(): void;
372
388
  appendEvent(label: string, detail?: string, completed?: boolean): void;
373
389
  attachObservation(text: string): void;
@@ -375,20 +391,21 @@ declare class PRBEAgentState extends EventEmitter {
375
391
  failInvestigation(message: string): void;
376
392
  setPendingInteraction(payload: InteractionPayload): void;
377
393
  clearPendingInteraction(): void;
378
- setCRPendingInteraction(crID: string, payload: InteractionPayload): void;
379
- clearCRPendingInteraction(crID: string): void;
394
+ setBackgroundPendingInteraction(backgroundId: string, payload: InteractionPayload): void;
395
+ clearBackgroundPendingInteraction(backgroundId: string): void;
380
396
  resolveInteraction(response: InteractionResponse): void;
381
- resolveCRInteraction(crID: string, response: InteractionResponse): void;
397
+ resolveBackgroundInteraction(backgroundId: string, response: InteractionResponse): void;
382
398
  setAgentMessage(message: string): void;
383
- setCRAgentMessage(crID: string, message: string): void;
399
+ setBackgroundAgentMessage(backgroundId: string, message: string): void;
384
400
  toggleExpansion(eventId: string): void;
385
- beginCR(id: string, query: string, slug?: string, ticketId?: string): void;
386
- appendCREvent(crID: string, label: string, detail?: string, completed?: boolean): void;
387
- attachCRObservation(crID: string, text: string): void;
388
- completeCR(id: string, report: string): void;
389
- 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;
390
406
  updateTrackedSessionIDs(ids: string[]): void;
391
407
  updateTicketInfo(info: TicketInfoOut[]): void;
408
+ updateAgentHistory(tickets: AgentTicketOut[]): void;
392
409
  }
393
410
 
394
411
  /**
@@ -398,11 +415,13 @@ declare class PRBEAgentState extends EventEmitter {
398
415
  * plain JSON-safe objects suitable for IPC or structured clone.
399
416
  */
400
417
 
401
- interface PRBESerializedCR {
418
+ interface PRBESerializedBackgroundInvestigation {
402
419
  id: string;
403
420
  query: string;
404
421
  slug?: string;
405
422
  ticketId?: string;
423
+ source?: string;
424
+ sourceDetail?: string;
406
425
  events: PRBEStatusEvent[];
407
426
  isRunning: boolean;
408
427
  isCompleted: boolean;
@@ -414,6 +433,7 @@ interface PRBESerializedCR {
414
433
  startedAt: string;
415
434
  pendingInteraction?: InteractionPayload;
416
435
  resolvedInteractions?: ResolvedInteraction[];
436
+ conversationHistory: ConversationEntry[];
417
437
  }
418
438
  type PRBESerializedTicket = TicketInfoOut;
419
439
  interface PRBESerializedCompletedInvestigation {
@@ -439,13 +459,13 @@ interface PRBESerializedState {
439
459
  agentMessage?: string;
440
460
  conversationHistory: ConversationEntry[];
441
461
  completedInvestigations: PRBESerializedCompletedInvestigation[];
442
- activeCRs: PRBESerializedCR[];
443
- completedCRs: PRBESerializedCR[];
444
- trackedSessionIDs: string[];
462
+ activeBackgroundInvestigations: PRBESerializedBackgroundInvestigation[];
463
+ completedBackgroundInvestigations: PRBESerializedBackgroundInvestigation[];
445
464
  ticketInfo: PRBESerializedTicket[];
465
+ agentHistory: AgentTicketOut[];
446
466
  hasActiveWork: boolean;
447
467
  }
448
468
  declare const DEFAULT_PRBE_STATE: PRBESerializedState;
449
469
  declare function serializePRBEState(state: PRBEAgentState): PRBESerializedState;
450
470
 
451
- export { 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, type TicketStatusOut 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, 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>;
@@ -136,6 +137,10 @@ declare enum ToolName {
136
137
  CLIENT_BASH_EXECUTE = "client_bash_execute",
137
138
  CLIENT_MESSAGE_USER = "client_message_user"
138
139
  }
140
+ declare enum UserIdentifierType {
141
+ EMAIL = "email",
142
+ ID = "id"
143
+ }
139
144
  declare enum PRBEAgentConfigKey {
140
145
  API_KEY = "apiKey",
141
146
  AUTO_APPROVED_DIRS = "autoApprovedDirs",
@@ -223,25 +228,26 @@ interface FlaggedFileIn {
223
228
  }
224
229
  interface PollRequest {
225
230
  agent_id: string;
226
- ticket_ids: string[];
227
231
  }
228
232
  interface ContextRequestOut {
229
233
  id: string;
230
234
  query: string;
231
235
  slug?: string;
236
+ ticket_id: string;
232
237
  is_active: boolean;
233
238
  created_at: string;
234
239
  }
235
- interface TicketStatusOut {
236
- ticket_id: string;
237
- status: string;
238
- 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;
239
247
  }
240
248
  interface PollResponse {
241
- tickets: TicketStatusOut[];
242
- }
243
- interface TicketInfoRequest {
244
- ticket_ids: string[];
249
+ context_requests: ContextRequestOut[];
250
+ external_requests: ExternalRequestOut[];
245
251
  }
246
252
  interface TicketInfoOut {
247
253
  ticket_id: string;
@@ -251,8 +257,25 @@ interface TicketInfoOut {
251
257
  description?: string;
252
258
  session_count: number;
253
259
  }
254
- interface TicketInfoResponse {
255
- 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[];
256
279
  }
257
280
  interface PRBEStatusEvent {
258
281
  id: string;
@@ -261,11 +284,13 @@ interface PRBEStatusEvent {
261
284
  isCompleted: boolean;
262
285
  isExpanded: boolean;
263
286
  }
264
- interface PRBECRInvestigation {
287
+ interface PRBEBackgroundInvestigation {
265
288
  id: string;
266
289
  query: string;
267
290
  slug?: string;
268
291
  ticketId?: string;
292
+ source?: string;
293
+ sourceDetail?: string;
269
294
  events: PRBEStatusEvent[];
270
295
  isRunning: boolean;
271
296
  isCompleted: boolean;
@@ -277,6 +302,7 @@ interface PRBECRInvestigation {
277
302
  startedAt: Date;
278
303
  pendingInteraction?: InteractionPayload;
279
304
  resolvedInteractions?: ResolvedInteraction[];
305
+ conversationHistory: ConversationEntry[];
280
306
  }
281
307
  interface PRBECompletedInvestigation {
282
308
  id: string;
@@ -289,18 +315,6 @@ interface PRBECompletedInvestigation {
289
315
  conversationHistory?: ConversationEntry[];
290
316
  completedAt: Date;
291
317
  }
292
- interface ResolveSessionsRequest {
293
- agent_id: string;
294
- session_ids: string[];
295
- }
296
- interface ResolvedTicketOut {
297
- ticket_id: string;
298
- status: string;
299
- session_ids: string[];
300
- }
301
- interface ResolveSessionsResponse {
302
- tickets: ResolvedTicketOut[];
303
- }
304
318
  declare enum PRBEAgentErrorType {
305
319
  SERVER_ERROR = "server_error",
306
320
  NETWORK_ERROR = "network_error",
@@ -332,10 +346,10 @@ declare enum PRBEStateEvent {
332
346
  COMPLETE = "complete",
333
347
  /** Emitted on error. Payload: { message: string } */
334
348
  ERROR = "error",
335
- /** Emitted when a background CR starts. Payload: PRBECRInvestigation */
336
- CR_START = "cr-start",
337
- /** Emitted when a background CR completes/fails. Payload: PRBECRInvestigation */
338
- 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",
339
353
  /** Emitted when tracked ticket IDs change. Payload: string[] */
340
354
  TICKETS_CHANGED = "tickets-changed",
341
355
  /** Emitted when ticket info is updated. Payload: TicketInfoOut[] */
@@ -359,15 +373,17 @@ declare class PRBEAgentState extends EventEmitter {
359
373
  agentMessage?: string;
360
374
  conversationHistory: ConversationEntry[];
361
375
  completedInvestigations: PRBECompletedInvestigation[];
362
- activeCRs: Map<string, PRBECRInvestigation>;
363
- completedCRs: PRBECRInvestigation[];
376
+ activeBackgroundInvestigations: Map<string, PRBEBackgroundInvestigation>;
377
+ completedBackgroundInvestigations: PRBEBackgroundInvestigation[];
364
378
  trackedSessionIDs: string[];
365
379
  ticketInfo: TicketInfoOut[];
380
+ agentHistory: AgentTicketOut[];
366
381
  get hasActiveWork(): boolean;
367
- get activeCRCount(): number;
382
+ get activeBackgroundCount(): number;
368
383
  get isActive(): boolean;
369
384
  beginInvestigation(query: string): void;
370
385
  appendConversation(entry: ConversationEntry): void;
386
+ appendBackgroundConversation(backgroundId: string, entry: ConversationEntry): void;
371
387
  resetInvestigation(): void;
372
388
  appendEvent(label: string, detail?: string, completed?: boolean): void;
373
389
  attachObservation(text: string): void;
@@ -375,20 +391,21 @@ declare class PRBEAgentState extends EventEmitter {
375
391
  failInvestigation(message: string): void;
376
392
  setPendingInteraction(payload: InteractionPayload): void;
377
393
  clearPendingInteraction(): void;
378
- setCRPendingInteraction(crID: string, payload: InteractionPayload): void;
379
- clearCRPendingInteraction(crID: string): void;
394
+ setBackgroundPendingInteraction(backgroundId: string, payload: InteractionPayload): void;
395
+ clearBackgroundPendingInteraction(backgroundId: string): void;
380
396
  resolveInteraction(response: InteractionResponse): void;
381
- resolveCRInteraction(crID: string, response: InteractionResponse): void;
397
+ resolveBackgroundInteraction(backgroundId: string, response: InteractionResponse): void;
382
398
  setAgentMessage(message: string): void;
383
- setCRAgentMessage(crID: string, message: string): void;
399
+ setBackgroundAgentMessage(backgroundId: string, message: string): void;
384
400
  toggleExpansion(eventId: string): void;
385
- beginCR(id: string, query: string, slug?: string, ticketId?: string): void;
386
- appendCREvent(crID: string, label: string, detail?: string, completed?: boolean): void;
387
- attachCRObservation(crID: string, text: string): void;
388
- completeCR(id: string, report: string): void;
389
- 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;
390
406
  updateTrackedSessionIDs(ids: string[]): void;
391
407
  updateTicketInfo(info: TicketInfoOut[]): void;
408
+ updateAgentHistory(tickets: AgentTicketOut[]): void;
392
409
  }
393
410
 
394
411
  /**
@@ -398,11 +415,13 @@ declare class PRBEAgentState extends EventEmitter {
398
415
  * plain JSON-safe objects suitable for IPC or structured clone.
399
416
  */
400
417
 
401
- interface PRBESerializedCR {
418
+ interface PRBESerializedBackgroundInvestigation {
402
419
  id: string;
403
420
  query: string;
404
421
  slug?: string;
405
422
  ticketId?: string;
423
+ source?: string;
424
+ sourceDetail?: string;
406
425
  events: PRBEStatusEvent[];
407
426
  isRunning: boolean;
408
427
  isCompleted: boolean;
@@ -414,6 +433,7 @@ interface PRBESerializedCR {
414
433
  startedAt: string;
415
434
  pendingInteraction?: InteractionPayload;
416
435
  resolvedInteractions?: ResolvedInteraction[];
436
+ conversationHistory: ConversationEntry[];
417
437
  }
418
438
  type PRBESerializedTicket = TicketInfoOut;
419
439
  interface PRBESerializedCompletedInvestigation {
@@ -439,13 +459,13 @@ interface PRBESerializedState {
439
459
  agentMessage?: string;
440
460
  conversationHistory: ConversationEntry[];
441
461
  completedInvestigations: PRBESerializedCompletedInvestigation[];
442
- activeCRs: PRBESerializedCR[];
443
- completedCRs: PRBESerializedCR[];
444
- trackedSessionIDs: string[];
462
+ activeBackgroundInvestigations: PRBESerializedBackgroundInvestigation[];
463
+ completedBackgroundInvestigations: PRBESerializedBackgroundInvestigation[];
445
464
  ticketInfo: PRBESerializedTicket[];
465
+ agentHistory: AgentTicketOut[];
446
466
  hasActiveWork: boolean;
447
467
  }
448
468
  declare const DEFAULT_PRBE_STATE: PRBESerializedState;
449
469
  declare function serializePRBEState(state: PRBEAgentState): PRBESerializedState;
450
470
 
451
- export { 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, type TicketStatusOut 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, 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, U as TicketStatusOut, V as ToolName, W as ToolParamType, X as WSMessage, Y as WSMessageType } from './types-Cyfgy1uD.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, U as TicketStatusOut, V as ToolName, W as ToolParamType, X as WSMessage, Y as WSMessageType } from './types-Cyfgy1uD.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";