@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.
- package/dist/index.d.mts +11 -17
- package/dist/index.d.ts +11 -17
- package/dist/index.js +250 -464
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +250 -464
- package/dist/index.mjs.map +1 -1
- package/dist/{types-BmH_CmsO.d.mts → types-BeZ2nQ9x.d.mts} +62 -46
- package/dist/{types-BmH_CmsO.d.ts → types-BeZ2nQ9x.d.ts} +62 -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
package/dist/index.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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, U as UserIdentifierType, g as PollResponse,
|
|
2
|
-
export {
|
|
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, U as UserIdentifierType, g as PollResponse, A as AgentHistoryResponse } from './types-BeZ2nQ9x.mjs';
|
|
2
|
+
export { h as API_URL, i as AgentHistoryRequest, j as AgentSessionOut, k as AgentTicketOut, l as AskQuestionPayload, m as AskQuestionResponse, C as ContextRequestOut, n as ConversationEntry, o as ConversationRole, D as DEFAULT_PRBE_STATE, E as ExternalRequestOut, p as InteractionType, q as InvestigationResult, M as MIDDLEWARE_URL, r as PRBEAgentConfigKey, s as PRBEAgentError, t as PRBEAgentErrorType, u as PRBEAgentStatus, v as PRBEAgentStatusType, w as PRBEBackgroundInvestigation, x as PRBECompletedInvestigation, y as PRBEInteractionHandler, z as PRBESerializedBackgroundInvestigation, B as PRBESerializedCompletedInvestigation, G as PRBESerializedState, H as PRBESerializedTicket, J as PRBEStateEvent, K as PRBEStatusEvent, L as PollRequest, 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, Z as redactPII, _ as serializePRBEState } from './types-BeZ2nQ9x.mjs';
|
|
3
3
|
import 'events';
|
|
4
4
|
|
|
5
|
-
var version = "0.1.
|
|
5
|
+
var version = "0.1.18";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* tools/index.ts — Tool interface, registry, and closure tool
|
|
@@ -148,17 +148,12 @@ declare class PRBEAgent implements PRBEInteractionRequester {
|
|
|
148
148
|
private persistedData;
|
|
149
149
|
private fetchAbortController;
|
|
150
150
|
private currentInvestigationSource;
|
|
151
|
-
private
|
|
152
|
-
private readonly historyStore;
|
|
151
|
+
private currentBackgroundId;
|
|
153
152
|
/** Files flagged during the current tool call — uploaded immediately after the tool returns. */
|
|
154
153
|
private pendingFlaggedFiles;
|
|
155
154
|
private userEmail?;
|
|
156
155
|
private userId?;
|
|
157
156
|
private get agentID();
|
|
158
|
-
private get trackedSessionIDs();
|
|
159
|
-
private set trackedSessionIDs(value);
|
|
160
|
-
private syncPolling;
|
|
161
|
-
private addTrackedSession;
|
|
162
157
|
constructor(config: PRBEAgentConfig);
|
|
163
158
|
private hookElectronLog;
|
|
164
159
|
private hookRendererLogs;
|
|
@@ -193,12 +188,13 @@ declare class PRBEAgent implements PRBEInteractionRequester {
|
|
|
193
188
|
registerTool(name: string, description: string, parameters: PRBEToolParameter[], handler: (args: Record<string, unknown>) => Promise<string>, options?: {
|
|
194
189
|
interactive?: boolean;
|
|
195
190
|
}): void;
|
|
191
|
+
private runInvestigation;
|
|
196
192
|
/**
|
|
197
193
|
* User-initiated investigation. Updates `state` events/report directly.
|
|
198
194
|
*/
|
|
199
195
|
investigate(query: string, contextRequestID?: string): Promise<void>;
|
|
200
196
|
/**
|
|
201
|
-
* Cancel user-initiated investigation only (does not cancel background
|
|
197
|
+
* Cancel user-initiated investigation only (does not cancel background investigations).
|
|
202
198
|
*/
|
|
203
199
|
cancelInvestigation(): void;
|
|
204
200
|
/**
|
|
@@ -206,15 +202,13 @@ declare class PRBEAgent implements PRBEInteractionRequester {
|
|
|
206
202
|
*/
|
|
207
203
|
cancel(): void;
|
|
208
204
|
/**
|
|
209
|
-
* Poll the backend for context requests
|
|
210
|
-
* Resolves session IDs → ticket IDs first, then polls with ticket IDs.
|
|
205
|
+
* Poll the backend for context requests and external requests.
|
|
211
206
|
*/
|
|
212
207
|
poll(): Promise<PollResponse | null>;
|
|
213
208
|
/**
|
|
214
|
-
* Fetch
|
|
215
|
-
* Resolves session IDs → ticket IDs first, then fetches ticket info.
|
|
209
|
+
* Fetch agent history (tickets + sessions) from the backend.
|
|
216
210
|
*/
|
|
217
|
-
|
|
211
|
+
fetchHistory(): Promise<AgentHistoryResponse | null>;
|
|
218
212
|
stopPolling(): void;
|
|
219
213
|
resumePolling(): void;
|
|
220
214
|
/**
|
|
@@ -231,13 +225,13 @@ declare class PRBEAgent implements PRBEInteractionRequester {
|
|
|
231
225
|
*/
|
|
232
226
|
static clearPersistedData(): void;
|
|
233
227
|
private investigateForCR;
|
|
228
|
+
private investigateForER;
|
|
234
229
|
private connectToProxy;
|
|
235
230
|
private handleMessage;
|
|
236
231
|
private extractArgs;
|
|
237
232
|
private extractUploadPrefix;
|
|
238
233
|
private static backgroundUpload;
|
|
239
234
|
private startPolling;
|
|
240
|
-
private resolveSessions;
|
|
241
235
|
/**
|
|
242
236
|
* Abort all in-flight fetch requests to prevent orphaned DNS lookups
|
|
243
237
|
* that can crash the c-ares resolver during process shutdown.
|
|
@@ -360,4 +354,4 @@ declare class BashExecuteTool implements PRBETool {
|
|
|
360
354
|
*/
|
|
361
355
|
declare const PROBE_MARK_SVG = "<svg width=\"256\" height=\"256\" viewBox=\"0 0 256 256\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M50 112 L114 148 L50 184 Z\" fill=\"#111111\" opacity=\"0.07\"/>\n <path d=\"M70 86 L148 134 L70 182 Z\" fill=\"#111111\" opacity=\"0.18\"/>\n <path d=\"M92 56 L192 118 L92 180 Z\" fill=\"#111111\"/>\n</svg>";
|
|
362
356
|
|
|
363
|
-
export { AskUserTool, BashExecuteTool, ClearAppLogsTool, FindFilesTool, FlagAppLogsTool, FlagFileTool, FlaggedFileIn, InteractionPayload, InteractionResponse, InvestigationSource, ListDirectoryTool, type LogEntry, PRBEAgent, PRBEAgentConfig, PRBEAgentState, PRBEClosureTool, PRBEInteractionRequester, PRBELogCapture, type PRBETool, PRBEToolDeclaration, PRBEToolParameter, PRBEToolRegistry, PROBE_MARK_SVG, PollResponse, ReadAppLogsTool, ReadFileTool, version as SDK_VERSION, SearchAppLogsTool, SearchContentTool,
|
|
357
|
+
export { AgentHistoryResponse, AskUserTool, BashExecuteTool, ClearAppLogsTool, FindFilesTool, FlagAppLogsTool, FlagFileTool, FlaggedFileIn, InteractionPayload, InteractionResponse, InvestigationSource, ListDirectoryTool, type LogEntry, PRBEAgent, PRBEAgentConfig, PRBEAgentState, PRBEClosureTool, PRBEInteractionRequester, PRBELogCapture, type PRBETool, PRBEToolDeclaration, PRBEToolParameter, PRBEToolRegistry, PROBE_MARK_SVG, PollResponse, ReadAppLogsTool, ReadFileTool, version as SDK_VERSION, SearchAppLogsTool, SearchContentTool, UserIdentifierType, humanReadableSize, resolveAndValidate, resolveWithAccessRequest };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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, U as UserIdentifierType, g as PollResponse,
|
|
2
|
-
export {
|
|
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, U as UserIdentifierType, g as PollResponse, A as AgentHistoryResponse } from './types-BeZ2nQ9x.js';
|
|
2
|
+
export { h as API_URL, i as AgentHistoryRequest, j as AgentSessionOut, k as AgentTicketOut, l as AskQuestionPayload, m as AskQuestionResponse, C as ContextRequestOut, n as ConversationEntry, o as ConversationRole, D as DEFAULT_PRBE_STATE, E as ExternalRequestOut, p as InteractionType, q as InvestigationResult, M as MIDDLEWARE_URL, r as PRBEAgentConfigKey, s as PRBEAgentError, t as PRBEAgentErrorType, u as PRBEAgentStatus, v as PRBEAgentStatusType, w as PRBEBackgroundInvestigation, x as PRBECompletedInvestigation, y as PRBEInteractionHandler, z as PRBESerializedBackgroundInvestigation, B as PRBESerializedCompletedInvestigation, G as PRBESerializedState, H as PRBESerializedTicket, J as PRBEStateEvent, K as PRBEStatusEvent, L as PollRequest, 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, Z as redactPII, _ as serializePRBEState } from './types-BeZ2nQ9x.js';
|
|
3
3
|
import 'events';
|
|
4
4
|
|
|
5
|
-
var version = "0.1.
|
|
5
|
+
var version = "0.1.18";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* tools/index.ts — Tool interface, registry, and closure tool
|
|
@@ -148,17 +148,12 @@ declare class PRBEAgent implements PRBEInteractionRequester {
|
|
|
148
148
|
private persistedData;
|
|
149
149
|
private fetchAbortController;
|
|
150
150
|
private currentInvestigationSource;
|
|
151
|
-
private
|
|
152
|
-
private readonly historyStore;
|
|
151
|
+
private currentBackgroundId;
|
|
153
152
|
/** Files flagged during the current tool call — uploaded immediately after the tool returns. */
|
|
154
153
|
private pendingFlaggedFiles;
|
|
155
154
|
private userEmail?;
|
|
156
155
|
private userId?;
|
|
157
156
|
private get agentID();
|
|
158
|
-
private get trackedSessionIDs();
|
|
159
|
-
private set trackedSessionIDs(value);
|
|
160
|
-
private syncPolling;
|
|
161
|
-
private addTrackedSession;
|
|
162
157
|
constructor(config: PRBEAgentConfig);
|
|
163
158
|
private hookElectronLog;
|
|
164
159
|
private hookRendererLogs;
|
|
@@ -193,12 +188,13 @@ declare class PRBEAgent implements PRBEInteractionRequester {
|
|
|
193
188
|
registerTool(name: string, description: string, parameters: PRBEToolParameter[], handler: (args: Record<string, unknown>) => Promise<string>, options?: {
|
|
194
189
|
interactive?: boolean;
|
|
195
190
|
}): void;
|
|
191
|
+
private runInvestigation;
|
|
196
192
|
/**
|
|
197
193
|
* User-initiated investigation. Updates `state` events/report directly.
|
|
198
194
|
*/
|
|
199
195
|
investigate(query: string, contextRequestID?: string): Promise<void>;
|
|
200
196
|
/**
|
|
201
|
-
* Cancel user-initiated investigation only (does not cancel background
|
|
197
|
+
* Cancel user-initiated investigation only (does not cancel background investigations).
|
|
202
198
|
*/
|
|
203
199
|
cancelInvestigation(): void;
|
|
204
200
|
/**
|
|
@@ -206,15 +202,13 @@ declare class PRBEAgent implements PRBEInteractionRequester {
|
|
|
206
202
|
*/
|
|
207
203
|
cancel(): void;
|
|
208
204
|
/**
|
|
209
|
-
* Poll the backend for context requests
|
|
210
|
-
* Resolves session IDs → ticket IDs first, then polls with ticket IDs.
|
|
205
|
+
* Poll the backend for context requests and external requests.
|
|
211
206
|
*/
|
|
212
207
|
poll(): Promise<PollResponse | null>;
|
|
213
208
|
/**
|
|
214
|
-
* Fetch
|
|
215
|
-
* Resolves session IDs → ticket IDs first, then fetches ticket info.
|
|
209
|
+
* Fetch agent history (tickets + sessions) from the backend.
|
|
216
210
|
*/
|
|
217
|
-
|
|
211
|
+
fetchHistory(): Promise<AgentHistoryResponse | null>;
|
|
218
212
|
stopPolling(): void;
|
|
219
213
|
resumePolling(): void;
|
|
220
214
|
/**
|
|
@@ -231,13 +225,13 @@ declare class PRBEAgent implements PRBEInteractionRequester {
|
|
|
231
225
|
*/
|
|
232
226
|
static clearPersistedData(): void;
|
|
233
227
|
private investigateForCR;
|
|
228
|
+
private investigateForER;
|
|
234
229
|
private connectToProxy;
|
|
235
230
|
private handleMessage;
|
|
236
231
|
private extractArgs;
|
|
237
232
|
private extractUploadPrefix;
|
|
238
233
|
private static backgroundUpload;
|
|
239
234
|
private startPolling;
|
|
240
|
-
private resolveSessions;
|
|
241
235
|
/**
|
|
242
236
|
* Abort all in-flight fetch requests to prevent orphaned DNS lookups
|
|
243
237
|
* that can crash the c-ares resolver during process shutdown.
|
|
@@ -360,4 +354,4 @@ declare class BashExecuteTool implements PRBETool {
|
|
|
360
354
|
*/
|
|
361
355
|
declare const PROBE_MARK_SVG = "<svg width=\"256\" height=\"256\" viewBox=\"0 0 256 256\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path d=\"M50 112 L114 148 L50 184 Z\" fill=\"#111111\" opacity=\"0.07\"/>\n <path d=\"M70 86 L148 134 L70 182 Z\" fill=\"#111111\" opacity=\"0.18\"/>\n <path d=\"M92 56 L192 118 L92 180 Z\" fill=\"#111111\"/>\n</svg>";
|
|
362
356
|
|
|
363
|
-
export { AskUserTool, BashExecuteTool, ClearAppLogsTool, FindFilesTool, FlagAppLogsTool, FlagFileTool, FlaggedFileIn, InteractionPayload, InteractionResponse, InvestigationSource, ListDirectoryTool, type LogEntry, PRBEAgent, PRBEAgentConfig, PRBEAgentState, PRBEClosureTool, PRBEInteractionRequester, PRBELogCapture, type PRBETool, PRBEToolDeclaration, PRBEToolParameter, PRBEToolRegistry, PROBE_MARK_SVG, PollResponse, ReadAppLogsTool, ReadFileTool, version as SDK_VERSION, SearchAppLogsTool, SearchContentTool,
|
|
357
|
+
export { AgentHistoryResponse, AskUserTool, BashExecuteTool, ClearAppLogsTool, FindFilesTool, FlagAppLogsTool, FlagFileTool, FlaggedFileIn, InteractionPayload, InteractionResponse, InvestigationSource, ListDirectoryTool, type LogEntry, PRBEAgent, PRBEAgentConfig, PRBEAgentState, PRBEClosureTool, PRBEInteractionRequester, PRBELogCapture, type PRBETool, PRBEToolDeclaration, PRBEToolParameter, PRBEToolRegistry, PROBE_MARK_SVG, PollResponse, ReadAppLogsTool, ReadFileTool, version as SDK_VERSION, SearchAppLogsTool, SearchContentTool, UserIdentifierType, humanReadableSize, resolveAndValidate, resolveWithAccessRequest };
|