@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 +13 -4
- package/dist/index.d.ts +13 -4
- package/dist/index.js +249 -226
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +248 -226
- package/dist/index.mjs.map +1 -1
- package/dist/{types-B_KS1-FJ.d.mts → types-Cyfgy1uD.d.mts} +31 -12
- package/dist/{types-B_KS1-FJ.d.ts → types-Cyfgy1uD.d.ts} +31 -12
- package/dist/types.d.mts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.js +4 -0
- package/dist/types.js.map +1 -1
- package/dist/types.mjs +4 -0
- package/dist/types.mjs.map +1 -1
- package/package.json +1 -1
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-
|
|
2
|
-
export { A as API_URL, h as AskQuestionPayload, i as AskQuestionResponse, C as ContextRequestOut, D as DEFAULT_PRBE_STATE,
|
|
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
|
|
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
|
|
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-
|
|
2
|
-
export { A as API_URL, h as AskQuestionPayload, i as AskQuestionResponse, C as ContextRequestOut, D as DEFAULT_PRBE_STATE,
|
|
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
|
|
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
|
|
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 {
|