@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.
- package/dist/index.d.mts +25 -17
- package/dist/index.d.ts +25 -17
- package/dist/index.js +311 -466
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +310 -466
- package/dist/index.mjs.map +1 -1
- package/dist/{types-Cyfgy1uD.d.mts → types-BeZ2nQ9x.d.mts} +66 -46
- package/dist/{types-Cyfgy1uD.d.ts → types-BeZ2nQ9x.d.ts} +66 -46
- package/dist/types.d.mts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.js +5 -5
- package/dist/types.js.map +1 -1
- package/dist/types.mjs +5 -5
- package/dist/types.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -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
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
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
|
-
|
|
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
|
|
255
|
-
|
|
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
|
|
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
|
|
336
|
-
|
|
337
|
-
/** Emitted when a background
|
|
338
|
-
|
|
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
|
-
|
|
363
|
-
|
|
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
|
|
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
|
-
|
|
379
|
-
|
|
394
|
+
setBackgroundPendingInteraction(backgroundId: string, payload: InteractionPayload): void;
|
|
395
|
+
clearBackgroundPendingInteraction(backgroundId: string): void;
|
|
380
396
|
resolveInteraction(response: InteractionResponse): void;
|
|
381
|
-
|
|
397
|
+
resolveBackgroundInteraction(backgroundId: string, response: InteractionResponse): void;
|
|
382
398
|
setAgentMessage(message: string): void;
|
|
383
|
-
|
|
399
|
+
setBackgroundAgentMessage(backgroundId: string, message: string): void;
|
|
384
400
|
toggleExpansion(eventId: string): void;
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
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
|
|
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
|
-
|
|
443
|
-
|
|
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 {
|
|
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
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
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
|
-
|
|
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
|
|
255
|
-
|
|
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
|
|
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
|
|
336
|
-
|
|
337
|
-
/** Emitted when a background
|
|
338
|
-
|
|
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
|
-
|
|
363
|
-
|
|
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
|
|
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
|
-
|
|
379
|
-
|
|
394
|
+
setBackgroundPendingInteraction(backgroundId: string, payload: InteractionPayload): void;
|
|
395
|
+
clearBackgroundPendingInteraction(backgroundId: string): void;
|
|
380
396
|
resolveInteraction(response: InteractionResponse): void;
|
|
381
|
-
|
|
397
|
+
resolveBackgroundInteraction(backgroundId: string, response: InteractionResponse): void;
|
|
382
398
|
setAgentMessage(message: string): void;
|
|
383
|
-
|
|
399
|
+
setBackgroundAgentMessage(backgroundId: string, message: string): void;
|
|
384
400
|
toggleExpansion(eventId: string): void;
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
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
|
|
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
|
-
|
|
443
|
-
|
|
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 {
|
|
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 {
|
|
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 {
|
|
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
|
-
|
|
133
|
-
|
|
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["
|
|
146
|
-
PRBEStateEvent2["
|
|
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";
|