@prbe.ai/electron-sdk 0.1.13 → 0.1.15

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 CHANGED
@@ -1,5 +1,5 @@
1
- import { P as PRBEToolDeclaration, a as PRBEToolParameter, b as PRBEInteractionRequester, F as FlaggedFileIn, c as PRBEAgentState, d as PRBEAgentConfig, I as InvestigationSource, e as InteractionPayload, f as InteractionResponse, g as PollResponse, T as TicketInfoOut } from './types-B_KS1-FJ.mjs';
2
- export { A as API_URL, h as AskQuestionPayload, i as AskQuestionResponse, C as ContextRequestOut, D as DEFAULT_PRBE_STATE, j as InteractionType, k as InvestigationResult, M as MIDDLEWARE_URL, l as PRBEAgentConfigKey, m as PRBEAgentError, n as PRBEAgentErrorType, o as PRBEAgentStatus, p as PRBEAgentStatusType, q as PRBECRInvestigation, r as PRBECompletedInvestigation, s as PRBEInteractionHandler, t as PRBESerializedCR, u as PRBESerializedCompletedInvestigation, v as PRBESerializedState, w as PRBESerializedTicket, x as PRBEStateEvent, y as PRBEStatusEvent, z as PollRequest, R as RequestPathAccessPayload, B as RequestPathAccessResponse, E as RequestPermissionPayload, G as RequestPermissionResponse, H as ResolveSessionsRequest, J as ResolveSessionsResponse, K as ResolvedInteraction, L as ResolvedTicketOut, N as TicketInfoRequest, O as TicketInfoResponse, Q as TicketStatusOut, S as ToolName, U as ToolParamType, W as WSMessage, V as WSMessageType, X as redactPII, Y as serializePRBEState } from './types-B_KS1-FJ.mjs';
1
+ import { P as PRBEToolDeclaration, a as PRBEToolParameter, b as PRBEInteractionRequester, F as FlaggedFileIn, c as PRBEAgentState, d as PRBEAgentConfig, I as InvestigationSource, e as InteractionPayload, f as InteractionResponse, g as PollResponse, T as TicketInfoOut } from './types-Cyfgy1uD.mjs';
2
+ export { A as API_URL, h as AskQuestionPayload, i as AskQuestionResponse, C as ContextRequestOut, j as ConversationEntry, k as ConversationRole, D as DEFAULT_PRBE_STATE, l as InteractionType, m as InvestigationResult, M as MIDDLEWARE_URL, n as PRBEAgentConfigKey, o as PRBEAgentError, p as PRBEAgentErrorType, q as PRBEAgentStatus, r as PRBEAgentStatusType, s as PRBECRInvestigation, t as PRBECompletedInvestigation, u as PRBEInteractionHandler, v as PRBESerializedCR, w as PRBESerializedCompletedInvestigation, x as PRBESerializedState, y as PRBESerializedTicket, z as PRBEStateEvent, B as PRBEStatusEvent, E as PollRequest, R as RequestPathAccessPayload, G as RequestPathAccessResponse, H as RequestPermissionPayload, J as RequestPermissionResponse, K as ResolveSessionsRequest, L as ResolveSessionsResponse, N as ResolvedInteraction, O as ResolvedTicketOut, Q as TicketInfoRequest, S as TicketInfoResponse, U as TicketStatusOut, V as ToolName, W as ToolParamType, X as WSMessage, Y as WSMessageType, Z as redactPII, _ as serializePRBEState } from './types-Cyfgy1uD.mjs';
3
3
  import 'events';
4
4
 
5
5
  /**
@@ -136,11 +136,12 @@ declare class PRBEAgent implements PRBEInteractionRequester {
136
136
  readonly logCapture: PRBELogCapture;
137
137
  private readonly config;
138
138
  private readonly appDataPath?;
139
+ private sessionMetadata;
139
140
  private readonly interactionHandler?;
140
141
  private readonly registry;
141
142
  private readonly grantedPaths;
142
143
  private userCancelled;
143
- private activeWS;
144
+ private activeConnection;
144
145
  private pollingTimer;
145
146
  private persistedData;
146
147
  private fetchAbortController;
@@ -159,11 +160,17 @@ declare class PRBEAgent implements PRBEInteractionRequester {
159
160
  private hookRendererLogs;
160
161
  private static mapElectronLogLevel;
161
162
  get investigationSource(): InvestigationSource;
163
+ sendConversationMessage(content: string): void;
162
164
  requestUserInteraction(payload: InteractionPayload): Promise<InteractionResponse>;
163
165
  /**
164
166
  * Add an additional root directory to the runtime allowed roots.
165
167
  */
166
168
  addAutoApprovedDir(rootPath: string): void;
169
+ /**
170
+ * Update session metadata. Merged with existing metadata.
171
+ * Call this to add user profile data, app version, etc. after async initialization.
172
+ */
173
+ updateSessionMetadata(metadata: Record<string, unknown>): void;
167
174
  /**
168
175
  * Register a custom tool that the middleware can invoke during investigations.
169
176
  */
@@ -209,7 +216,7 @@ declare class PRBEAgent implements PRBEInteractionRequester {
209
216
  static clearPersistedData(): void;
210
217
  private investigateForCR;
211
218
  private connectToProxy;
212
- private sendCancel;
219
+ private handleMessage;
213
220
  private extractArgs;
214
221
  private extractUploadPrefix;
215
222
  private static backgroundUpload;
@@ -292,6 +299,8 @@ declare class FlagFileTool implements PRBETool {
292
299
  * tools/interactive.ts — AskUserTool
293
300
  *
294
301
  * Allows the agent to ask the user a question during an investigation.
302
+ * The question text is displayed via conversation history (middleware handles this).
303
+ * This tool only prompts the user for input with an optional reason hint.
295
304
  */
296
305
 
297
306
  declare class AskUserTool implements PRBETool {
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { P as PRBEToolDeclaration, a as PRBEToolParameter, b as PRBEInteractionRequester, F as FlaggedFileIn, c as PRBEAgentState, d as PRBEAgentConfig, I as InvestigationSource, e as InteractionPayload, f as InteractionResponse, g as PollResponse, T as TicketInfoOut } from './types-B_KS1-FJ.js';
2
- export { A as API_URL, h as AskQuestionPayload, i as AskQuestionResponse, C as ContextRequestOut, D as DEFAULT_PRBE_STATE, j as InteractionType, k as InvestigationResult, M as MIDDLEWARE_URL, l as PRBEAgentConfigKey, m as PRBEAgentError, n as PRBEAgentErrorType, o as PRBEAgentStatus, p as PRBEAgentStatusType, q as PRBECRInvestigation, r as PRBECompletedInvestigation, s as PRBEInteractionHandler, t as PRBESerializedCR, u as PRBESerializedCompletedInvestigation, v as PRBESerializedState, w as PRBESerializedTicket, x as PRBEStateEvent, y as PRBEStatusEvent, z as PollRequest, R as RequestPathAccessPayload, B as RequestPathAccessResponse, E as RequestPermissionPayload, G as RequestPermissionResponse, H as ResolveSessionsRequest, J as ResolveSessionsResponse, K as ResolvedInteraction, L as ResolvedTicketOut, N as TicketInfoRequest, O as TicketInfoResponse, Q as TicketStatusOut, S as ToolName, U as ToolParamType, W as WSMessage, V as WSMessageType, X as redactPII, Y as serializePRBEState } from './types-B_KS1-FJ.js';
1
+ import { P as PRBEToolDeclaration, a as PRBEToolParameter, b as PRBEInteractionRequester, F as FlaggedFileIn, c as PRBEAgentState, d as PRBEAgentConfig, I as InvestigationSource, e as InteractionPayload, f as InteractionResponse, g as PollResponse, T as TicketInfoOut } from './types-Cyfgy1uD.js';
2
+ export { A as API_URL, h as AskQuestionPayload, i as AskQuestionResponse, C as ContextRequestOut, j as ConversationEntry, k as ConversationRole, D as DEFAULT_PRBE_STATE, l as InteractionType, m as InvestigationResult, M as MIDDLEWARE_URL, n as PRBEAgentConfigKey, o as PRBEAgentError, p as PRBEAgentErrorType, q as PRBEAgentStatus, r as PRBEAgentStatusType, s as PRBECRInvestigation, t as PRBECompletedInvestigation, u as PRBEInteractionHandler, v as PRBESerializedCR, w as PRBESerializedCompletedInvestigation, x as PRBESerializedState, y as PRBESerializedTicket, z as PRBEStateEvent, B as PRBEStatusEvent, E as PollRequest, R as RequestPathAccessPayload, G as RequestPathAccessResponse, H as RequestPermissionPayload, J as RequestPermissionResponse, K as ResolveSessionsRequest, L as ResolveSessionsResponse, N as ResolvedInteraction, O as ResolvedTicketOut, Q as TicketInfoRequest, S as TicketInfoResponse, U as TicketStatusOut, V as ToolName, W as ToolParamType, X as WSMessage, Y as WSMessageType, Z as redactPII, _ as serializePRBEState } from './types-Cyfgy1uD.js';
3
3
  import 'events';
4
4
 
5
5
  /**
@@ -136,11 +136,12 @@ declare class PRBEAgent implements PRBEInteractionRequester {
136
136
  readonly logCapture: PRBELogCapture;
137
137
  private readonly config;
138
138
  private readonly appDataPath?;
139
+ private sessionMetadata;
139
140
  private readonly interactionHandler?;
140
141
  private readonly registry;
141
142
  private readonly grantedPaths;
142
143
  private userCancelled;
143
- private activeWS;
144
+ private activeConnection;
144
145
  private pollingTimer;
145
146
  private persistedData;
146
147
  private fetchAbortController;
@@ -159,11 +160,17 @@ declare class PRBEAgent implements PRBEInteractionRequester {
159
160
  private hookRendererLogs;
160
161
  private static mapElectronLogLevel;
161
162
  get investigationSource(): InvestigationSource;
163
+ sendConversationMessage(content: string): void;
162
164
  requestUserInteraction(payload: InteractionPayload): Promise<InteractionResponse>;
163
165
  /**
164
166
  * Add an additional root directory to the runtime allowed roots.
165
167
  */
166
168
  addAutoApprovedDir(rootPath: string): void;
169
+ /**
170
+ * Update session metadata. Merged with existing metadata.
171
+ * Call this to add user profile data, app version, etc. after async initialization.
172
+ */
173
+ updateSessionMetadata(metadata: Record<string, unknown>): void;
167
174
  /**
168
175
  * Register a custom tool that the middleware can invoke during investigations.
169
176
  */
@@ -209,7 +216,7 @@ declare class PRBEAgent implements PRBEInteractionRequester {
209
216
  static clearPersistedData(): void;
210
217
  private investigateForCR;
211
218
  private connectToProxy;
212
- private sendCancel;
219
+ private handleMessage;
213
220
  private extractArgs;
214
221
  private extractUploadPrefix;
215
222
  private static backgroundUpload;
@@ -292,6 +299,8 @@ declare class FlagFileTool implements PRBETool {
292
299
  * tools/interactive.ts — AskUserTool
293
300
  *
294
301
  * Allows the agent to ask the user a question during an investigation.
302
+ * The question text is displayed via conversation history (middleware handles this).
303
+ * This tool only prompts the user for input with an optional reason hint.
295
304
  */
296
305
 
297
306
  declare class AskUserTool implements PRBETool {