@prbe.ai/electron-sdk 0.1.0
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/agent.d.ts +105 -0
- package/dist/agent.d.ts.map +1 -0
- package/dist/agent.js +861 -0
- package/dist/agent.js.map +1 -0
- package/dist/assets/index.d.ts +6 -0
- package/dist/assets/index.d.ts.map +1 -0
- package/dist/assets/index.js +13 -0
- package/dist/assets/index.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +62 -0
- package/dist/index.js.map +1 -0
- package/dist/interactions.d.ts +56 -0
- package/dist/interactions.d.ts.map +1 -0
- package/dist/interactions.js +27 -0
- package/dist/interactions.js.map +1 -0
- package/dist/models.d.ts +212 -0
- package/dist/models.d.ts.map +1 -0
- package/dist/models.js +120 -0
- package/dist/models.js.map +1 -0
- package/dist/serialization.d.ts +49 -0
- package/dist/serialization.d.ts.map +1 -0
- package/dist/serialization.js +69 -0
- package/dist/serialization.js.map +1 -0
- package/dist/state.d.ts +67 -0
- package/dist/state.d.ts.map +1 -0
- package/dist/state.js +270 -0
- package/dist/state.js.map +1 -0
- package/dist/tools/bash.d.ts +30 -0
- package/dist/tools/bash.d.ts.map +1 -0
- package/dist/tools/bash.js +247 -0
- package/dist/tools/bash.js.map +1 -0
- package/dist/tools/filesystem.d.ts +63 -0
- package/dist/tools/filesystem.d.ts.map +1 -0
- package/dist/tools/filesystem.js +573 -0
- package/dist/tools/filesystem.js.map +1 -0
- package/dist/tools/index.d.ts +46 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +171 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/interactive.d.ts +15 -0
- package/dist/tools/interactive.d.ts.map +1 -0
- package/dist/tools/interactive.js +57 -0
- package/dist/tools/interactive.js.map +1 -0
- package/dist/tools/logs.d.ts +72 -0
- package/dist/tools/logs.d.ts.map +1 -0
- package/dist/tools/logs.js +366 -0
- package/dist/tools/logs.js.map +1 -0
- package/dist/types.d.ts +14 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +32 -0
- package/dist/types.js.map +1 -0
- package/package.json +35 -0
- package/src/assets/probe-mark.svg +5 -0
|
@@ -0,0 +1,366 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* tools/logs.ts — Log capture + built-in log tools
|
|
4
|
+
*
|
|
5
|
+
* Implements: client_read_app_logs, client_search_app_logs,
|
|
6
|
+
* client_clear_app_logs, client_flag_app_logs
|
|
7
|
+
*
|
|
8
|
+
* Mirrors PRBELogCapture.swift + log tool implementations from PRBEAgentTools.swift.
|
|
9
|
+
* Log capture works by monkey-patching console.log/warn/error in the Electron main process.
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.FlagAppLogsTool = exports.ClearAppLogsTool = exports.SearchAppLogsTool = exports.ReadAppLogsTool = exports.PRBELogCapture = void 0;
|
|
13
|
+
const models_1 = require("../models");
|
|
14
|
+
// ---------------------------------------------------------------------------
|
|
15
|
+
// PRBELogCapture
|
|
16
|
+
// ---------------------------------------------------------------------------
|
|
17
|
+
class PRBELogCapture {
|
|
18
|
+
entries = [];
|
|
19
|
+
maxEntries;
|
|
20
|
+
isCapturing = false;
|
|
21
|
+
// Original console methods, saved for restoration
|
|
22
|
+
originalLog;
|
|
23
|
+
originalWarn;
|
|
24
|
+
originalError;
|
|
25
|
+
originalDebug;
|
|
26
|
+
originalInfo;
|
|
27
|
+
constructor(maxEntries = 10_000) {
|
|
28
|
+
this.maxEntries = maxEntries;
|
|
29
|
+
}
|
|
30
|
+
// ---------- Structured Logging ----------
|
|
31
|
+
log(message, level = "PRINT", category = "print") {
|
|
32
|
+
this.append({
|
|
33
|
+
timestamp: new Date(),
|
|
34
|
+
level,
|
|
35
|
+
category,
|
|
36
|
+
message,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
// ---------- Query ----------
|
|
40
|
+
get count() {
|
|
41
|
+
return this.entries.length;
|
|
42
|
+
}
|
|
43
|
+
getEntries(options = {}) {
|
|
44
|
+
const { offset = 0, limit = 100, level, from, to } = options;
|
|
45
|
+
let filtered = this.entries;
|
|
46
|
+
if (level) {
|
|
47
|
+
filtered = filtered.filter((e) => e.level === level);
|
|
48
|
+
}
|
|
49
|
+
if (from) {
|
|
50
|
+
filtered = filtered.filter((e) => e.timestamp >= from);
|
|
51
|
+
}
|
|
52
|
+
if (to) {
|
|
53
|
+
filtered = filtered.filter((e) => e.timestamp <= to);
|
|
54
|
+
}
|
|
55
|
+
if (offset >= filtered.length)
|
|
56
|
+
return [];
|
|
57
|
+
const end = Math.min(offset + limit, filtered.length);
|
|
58
|
+
return filtered.slice(offset, end);
|
|
59
|
+
}
|
|
60
|
+
search(pattern, contextLines = 2, maxResults = 50) {
|
|
61
|
+
let regex;
|
|
62
|
+
try {
|
|
63
|
+
regex = new RegExp(pattern, "i");
|
|
64
|
+
}
|
|
65
|
+
catch {
|
|
66
|
+
return [];
|
|
67
|
+
}
|
|
68
|
+
const results = [];
|
|
69
|
+
for (let i = 0; i < this.entries.length; i++) {
|
|
70
|
+
if (results.length >= maxResults)
|
|
71
|
+
break;
|
|
72
|
+
if (regex.test(this.entries[i].message)) {
|
|
73
|
+
results.push({ index: i, entry: this.entries[i] });
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return results;
|
|
77
|
+
}
|
|
78
|
+
// ---------- Clear ----------
|
|
79
|
+
clearLogs() {
|
|
80
|
+
const count = this.entries.length;
|
|
81
|
+
this.entries = [];
|
|
82
|
+
return count;
|
|
83
|
+
}
|
|
84
|
+
// ---------- Console Capture ----------
|
|
85
|
+
startCapturing() {
|
|
86
|
+
if (this.isCapturing)
|
|
87
|
+
return;
|
|
88
|
+
this.isCapturing = true;
|
|
89
|
+
// Save originals
|
|
90
|
+
this.originalLog = console.log;
|
|
91
|
+
this.originalWarn = console.warn;
|
|
92
|
+
this.originalError = console.error;
|
|
93
|
+
this.originalDebug = console.debug;
|
|
94
|
+
this.originalInfo = console.info;
|
|
95
|
+
const self = this;
|
|
96
|
+
console.log = (...args) => {
|
|
97
|
+
self.originalLog?.apply(console, args);
|
|
98
|
+
self.log(args.map(String).join(" "), "PRINT", "console.log");
|
|
99
|
+
};
|
|
100
|
+
console.warn = (...args) => {
|
|
101
|
+
self.originalWarn?.apply(console, args);
|
|
102
|
+
self.log(args.map(String).join(" "), "WARNING", "console.warn");
|
|
103
|
+
};
|
|
104
|
+
console.error = (...args) => {
|
|
105
|
+
self.originalError?.apply(console, args);
|
|
106
|
+
self.log(args.map(String).join(" "), "ERROR", "console.error");
|
|
107
|
+
};
|
|
108
|
+
console.debug = (...args) => {
|
|
109
|
+
self.originalDebug?.apply(console, args);
|
|
110
|
+
self.log(args.map(String).join(" "), "DEBUG", "console.debug");
|
|
111
|
+
};
|
|
112
|
+
console.info = (...args) => {
|
|
113
|
+
self.originalInfo?.apply(console, args);
|
|
114
|
+
self.log(args.map(String).join(" "), "INFO", "console.info");
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
stopCapturing() {
|
|
118
|
+
if (!this.isCapturing)
|
|
119
|
+
return;
|
|
120
|
+
this.isCapturing = false;
|
|
121
|
+
if (this.originalLog)
|
|
122
|
+
console.log = this.originalLog;
|
|
123
|
+
if (this.originalWarn)
|
|
124
|
+
console.warn = this.originalWarn;
|
|
125
|
+
if (this.originalError)
|
|
126
|
+
console.error = this.originalError;
|
|
127
|
+
if (this.originalDebug)
|
|
128
|
+
console.debug = this.originalDebug;
|
|
129
|
+
if (this.originalInfo)
|
|
130
|
+
console.info = this.originalInfo;
|
|
131
|
+
this.originalLog = undefined;
|
|
132
|
+
this.originalWarn = undefined;
|
|
133
|
+
this.originalError = undefined;
|
|
134
|
+
this.originalDebug = undefined;
|
|
135
|
+
this.originalInfo = undefined;
|
|
136
|
+
}
|
|
137
|
+
// ---------- Raw access to all entries (for tools) ----------
|
|
138
|
+
getAllEntries() {
|
|
139
|
+
return this.entries;
|
|
140
|
+
}
|
|
141
|
+
// ---------- Private ----------
|
|
142
|
+
append(entry) {
|
|
143
|
+
this.entries.push(entry);
|
|
144
|
+
if (this.entries.length > this.maxEntries) {
|
|
145
|
+
this.entries.splice(0, this.entries.length - this.maxEntries);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
exports.PRBELogCapture = PRBELogCapture;
|
|
150
|
+
// ---------------------------------------------------------------------------
|
|
151
|
+
// ReadAppLogsTool
|
|
152
|
+
// ---------------------------------------------------------------------------
|
|
153
|
+
class ReadAppLogsTool {
|
|
154
|
+
logCapture;
|
|
155
|
+
constructor(logCapture) {
|
|
156
|
+
this.logCapture = logCapture;
|
|
157
|
+
}
|
|
158
|
+
get declaration() {
|
|
159
|
+
return {
|
|
160
|
+
name: models_1.ToolName.CLIENT_READ_APP_LOGS,
|
|
161
|
+
description: "Read application log entries captured from stdout and structured logging",
|
|
162
|
+
parameters: [
|
|
163
|
+
{ name: "position", type: models_1.ToolParamType.STRING, description: '"top" (oldest first) or "bottom" (newest first). Default: "bottom"', required: false },
|
|
164
|
+
{ name: "count", type: models_1.ToolParamType.INTEGER, description: "Number of entries to return. Default: 100", required: false },
|
|
165
|
+
{ name: "level", type: models_1.ToolParamType.STRING, description: 'Filter by log level (e.g. "ERROR", "INFO", "PRINT")', required: false },
|
|
166
|
+
{ name: "from", type: models_1.ToolParamType.STRING, description: "ISO8601 start timestamp filter", required: false },
|
|
167
|
+
{ name: "to", type: models_1.ToolParamType.STRING, description: "ISO8601 end timestamp filter", required: false },
|
|
168
|
+
],
|
|
169
|
+
};
|
|
170
|
+
}
|
|
171
|
+
async execute(args) {
|
|
172
|
+
const position = args["position"] ?? "bottom";
|
|
173
|
+
const count = typeof args["count"] === "number" ? args["count"] : 100;
|
|
174
|
+
const level = args["level"];
|
|
175
|
+
const fromDate = args["from"] ? new Date(args["from"]) : undefined;
|
|
176
|
+
const toDate = args["to"] ? new Date(args["to"]) : undefined;
|
|
177
|
+
const totalCount = this.logCapture.count;
|
|
178
|
+
const allEntries = this.logCapture.getEntries({
|
|
179
|
+
offset: 0,
|
|
180
|
+
limit: totalCount,
|
|
181
|
+
level,
|
|
182
|
+
from: fromDate,
|
|
183
|
+
to: toDate,
|
|
184
|
+
});
|
|
185
|
+
if (allEntries.length === 0) {
|
|
186
|
+
return "No log entries found matching the specified filters.";
|
|
187
|
+
}
|
|
188
|
+
let selected;
|
|
189
|
+
if (position === "top") {
|
|
190
|
+
selected = allEntries.slice(0, count);
|
|
191
|
+
}
|
|
192
|
+
else {
|
|
193
|
+
selected = allEntries.slice(-count);
|
|
194
|
+
}
|
|
195
|
+
let result = `Log entries (${selected.length} of ${allEntries.length} total):\n\n`;
|
|
196
|
+
for (const entry of selected) {
|
|
197
|
+
result += `[${entry.timestamp.toISOString()}] [${entry.level}] [${entry.category}] ${entry.message}\n`;
|
|
198
|
+
}
|
|
199
|
+
return result;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
exports.ReadAppLogsTool = ReadAppLogsTool;
|
|
203
|
+
// ---------------------------------------------------------------------------
|
|
204
|
+
// SearchAppLogsTool
|
|
205
|
+
// ---------------------------------------------------------------------------
|
|
206
|
+
class SearchAppLogsTool {
|
|
207
|
+
logCapture;
|
|
208
|
+
constructor(logCapture) {
|
|
209
|
+
this.logCapture = logCapture;
|
|
210
|
+
}
|
|
211
|
+
get declaration() {
|
|
212
|
+
return {
|
|
213
|
+
name: models_1.ToolName.CLIENT_SEARCH_APP_LOGS,
|
|
214
|
+
description: "Search application logs by regex pattern with surrounding context",
|
|
215
|
+
parameters: [
|
|
216
|
+
{ name: "pattern", type: models_1.ToolParamType.STRING, description: "Regex pattern to search for", required: true },
|
|
217
|
+
{ name: "context_lines", type: models_1.ToolParamType.INTEGER, description: "Number of surrounding log entries for context. Default: 2", required: false },
|
|
218
|
+
{ name: "max_results", type: models_1.ToolParamType.INTEGER, description: "Maximum matches to return. Default: 50", required: false },
|
|
219
|
+
],
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
async execute(args) {
|
|
223
|
+
const pattern = args["pattern"];
|
|
224
|
+
if (!pattern)
|
|
225
|
+
return "Error: 'pattern' parameter is required";
|
|
226
|
+
const contextLines = typeof args["context_lines"] === "number" ? args["context_lines"] : 2;
|
|
227
|
+
const maxResults = typeof args["max_results"] === "number" ? args["max_results"] : 50;
|
|
228
|
+
const matches = this.logCapture.search(pattern, contextLines, maxResults);
|
|
229
|
+
if (matches.length === 0) {
|
|
230
|
+
return `No log entries matching '${pattern}' found.`;
|
|
231
|
+
}
|
|
232
|
+
const allEntries = this.logCapture.getAllEntries();
|
|
233
|
+
let result = `Found ${matches.length} match(es) for '${pattern}':\n\n`;
|
|
234
|
+
for (const match of matches) {
|
|
235
|
+
const startIdx = Math.max(0, match.index - contextLines);
|
|
236
|
+
const endIdx = Math.min(allEntries.length - 1, match.index + contextLines);
|
|
237
|
+
for (let i = startIdx; i <= endIdx; i++) {
|
|
238
|
+
const entry = allEntries[i];
|
|
239
|
+
const marker = i === match.index ? ">" : " ";
|
|
240
|
+
result += `${marker} [${entry.timestamp.toISOString()}] [${entry.level}] [${entry.category}] ${entry.message}\n`;
|
|
241
|
+
}
|
|
242
|
+
result += "---\n";
|
|
243
|
+
}
|
|
244
|
+
return result;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
exports.SearchAppLogsTool = SearchAppLogsTool;
|
|
248
|
+
// ---------------------------------------------------------------------------
|
|
249
|
+
// ClearAppLogsTool
|
|
250
|
+
// ---------------------------------------------------------------------------
|
|
251
|
+
class ClearAppLogsTool {
|
|
252
|
+
logCapture;
|
|
253
|
+
constructor(logCapture) {
|
|
254
|
+
this.logCapture = logCapture;
|
|
255
|
+
}
|
|
256
|
+
get declaration() {
|
|
257
|
+
return {
|
|
258
|
+
name: models_1.ToolName.CLIENT_CLEAR_APP_LOGS,
|
|
259
|
+
description: "Clear all captured application logs",
|
|
260
|
+
parameters: [],
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
async execute(_args) {
|
|
264
|
+
const cleared = this.logCapture.clearLogs();
|
|
265
|
+
return `Cleared ${cleared} log entries.`;
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
exports.ClearAppLogsTool = ClearAppLogsTool;
|
|
269
|
+
// ---------------------------------------------------------------------------
|
|
270
|
+
// FlagAppLogsTool
|
|
271
|
+
// ---------------------------------------------------------------------------
|
|
272
|
+
class FlagAppLogsTool {
|
|
273
|
+
logCapture;
|
|
274
|
+
onFlag;
|
|
275
|
+
constructor(logCapture, onFlag) {
|
|
276
|
+
this.logCapture = logCapture;
|
|
277
|
+
this.onFlag = onFlag;
|
|
278
|
+
}
|
|
279
|
+
get declaration() {
|
|
280
|
+
return {
|
|
281
|
+
name: models_1.ToolName.CLIENT_FLAG_APP_LOGS,
|
|
282
|
+
description: "Flag application log entries as evidence for the debug report. Snapshots matching log entries and includes them in the output package. Call with no filters to flag all logs, or use pattern to filter by message content. Note: 'level' filters by the log level metadata (e.g. PRINT, ERROR), NOT by message content — use 'pattern' to match words in log messages.",
|
|
283
|
+
parameters: [
|
|
284
|
+
{ name: "reason", type: models_1.ToolParamType.STRING, description: "Why these logs are relevant", required: true },
|
|
285
|
+
{ name: "pattern", type: models_1.ToolParamType.STRING, description: "Regex pattern to filter log messages by content", required: false },
|
|
286
|
+
{ name: "level", type: models_1.ToolParamType.STRING, description: "Filter by log level metadata (PRINT, DEBUG, INFO, ERROR, etc.) — this is NOT a content search", required: false },
|
|
287
|
+
{ name: "from", type: models_1.ToolParamType.STRING, description: "ISO8601 start timestamp filter", required: false },
|
|
288
|
+
{ name: "to", type: models_1.ToolParamType.STRING, description: "ISO8601 end timestamp filter", required: false },
|
|
289
|
+
],
|
|
290
|
+
};
|
|
291
|
+
}
|
|
292
|
+
async execute(args) {
|
|
293
|
+
const reason = args["reason"];
|
|
294
|
+
if (!reason)
|
|
295
|
+
return "Error: 'reason' parameter is required";
|
|
296
|
+
const level = args["level"];
|
|
297
|
+
const fromDate = args["from"] ? new Date(args["from"]) : undefined;
|
|
298
|
+
const toDate = args["to"] ? new Date(args["to"]) : undefined;
|
|
299
|
+
// Get filtered entries
|
|
300
|
+
const totalCount = this.logCapture.count;
|
|
301
|
+
let entries = this.logCapture.getEntries({
|
|
302
|
+
offset: 0,
|
|
303
|
+
limit: totalCount,
|
|
304
|
+
level,
|
|
305
|
+
from: fromDate,
|
|
306
|
+
to: toDate,
|
|
307
|
+
});
|
|
308
|
+
// Apply regex pattern filter if provided
|
|
309
|
+
const patternStr = args["pattern"];
|
|
310
|
+
if (patternStr) {
|
|
311
|
+
let regex;
|
|
312
|
+
try {
|
|
313
|
+
regex = new RegExp(patternStr, "i");
|
|
314
|
+
}
|
|
315
|
+
catch {
|
|
316
|
+
return `Error: invalid regex pattern '${patternStr}'`;
|
|
317
|
+
}
|
|
318
|
+
entries = entries.filter((entry) => regex.test(entry.message));
|
|
319
|
+
}
|
|
320
|
+
if (entries.length === 0) {
|
|
321
|
+
const filters = [];
|
|
322
|
+
if (level)
|
|
323
|
+
filters.push(`level=${level}`);
|
|
324
|
+
if (patternStr)
|
|
325
|
+
filters.push(`pattern=${patternStr}`);
|
|
326
|
+
if (fromDate)
|
|
327
|
+
filters.push(`from=${args["from"]}`);
|
|
328
|
+
if (toDate)
|
|
329
|
+
filters.push(`to=${args["to"]}`);
|
|
330
|
+
const hint = filters.length === 0
|
|
331
|
+
? `The log buffer is empty (${totalCount} entries).`
|
|
332
|
+
: `No entries matched filters: ${filters.join(", ")}. Total log entries: ${totalCount}. Try calling with no filters, or use 'pattern' instead of 'level' to match message content.`;
|
|
333
|
+
return hint;
|
|
334
|
+
}
|
|
335
|
+
// Format entries into file-like content
|
|
336
|
+
let content = "";
|
|
337
|
+
for (const entry of entries) {
|
|
338
|
+
content += `[${entry.timestamp.toISOString()}] [${entry.level}] [${entry.category}] ${entry.message}\n`;
|
|
339
|
+
}
|
|
340
|
+
// Build a descriptive filename: app_logs_<filter_summary>_<timestamp>.txt
|
|
341
|
+
const nameParts = ["app_logs"];
|
|
342
|
+
if (level)
|
|
343
|
+
nameParts.push(level.toLowerCase());
|
|
344
|
+
if (patternStr) {
|
|
345
|
+
const safe = patternStr.replace(/[^a-zA-Z0-9]/g, "_");
|
|
346
|
+
const trimmed = safe.substring(0, 30).replace(/^_+|_+$/g, "");
|
|
347
|
+
if (trimmed.length > 0)
|
|
348
|
+
nameParts.push(trimmed);
|
|
349
|
+
}
|
|
350
|
+
const ts = new Date()
|
|
351
|
+
.toISOString()
|
|
352
|
+
.replace(/[:\-]/g, "")
|
|
353
|
+
.substring(0, 15); // e.g. "20260316T212158"
|
|
354
|
+
nameParts.push(ts);
|
|
355
|
+
const filename = nameParts.join("_") + ".txt";
|
|
356
|
+
this.onFlag({
|
|
357
|
+
originalPath: filename,
|
|
358
|
+
reason,
|
|
359
|
+
data: Buffer.from((0, models_1.redactPII)(content), "utf-8"),
|
|
360
|
+
isText: true,
|
|
361
|
+
});
|
|
362
|
+
return `Flagged ${entries.length} log entries as '${filename}' — reason: ${reason}`;
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
exports.FlagAppLogsTool = FlagAppLogsTool;
|
|
366
|
+
//# sourceMappingURL=logs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"logs.js","sourceRoot":"","sources":["../../src/tools/logs.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AAGH,sCAA+D;AAc/D,8EAA8E;AAC9E,iBAAiB;AACjB,8EAA8E;AAE9E,MAAa,cAAc;IACjB,OAAO,GAAe,EAAE,CAAC;IAChB,UAAU,CAAS;IAC5B,WAAW,GAAG,KAAK,CAAC;IAE5B,kDAAkD;IAC1C,WAAW,CAAsB;IACjC,YAAY,CAAuB;IACnC,aAAa,CAAwB;IACrC,aAAa,CAAwB;IACrC,YAAY,CAAuB;IAE3C,YAAY,aAAqB,MAAM;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AS,GAAG,CAAC,UAAU,CAAC,CAAC;QAC/B,IAAI,KAAK;YAAE,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC;QAC/C,IAAI,UAAU,EAAE,CAAC;YACf,MAAM,IAAI,GAAG,UAAU,CAAC,OAAO,CAAC,eAAe,EAAE,GAAG,CAAC,CAAC;YACtD,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;YAC9D,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC;gBAAE,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QAClD,CAAC;QACD,MAAM,EAAE,GAAG,IAAI,IAAI,EAAE;aAClB,WAAW,EAAE;aACb,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;aACrB,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,yBAAyB;QAC9C,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACnB,MAAM,QAAQ,GAAG,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,MAAM,CAAC;QAE9C,IAAI,CAAC,MAAM,CAAC;YACV,YAAY,EAAE,QAAQ;YACtB,MAAM;YACN,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,IAAA,kBAAS,EAAC,OAAO,CAAC,EAAE,OAAO,CAAC;YAC9C,MAAM,EAAE,IAAI;SACb,CAAC,CAAC;QAEH,OAAO,WAAW,OAAO,CAAC,MAAM,oBAAoB,QAAQ,eAAe,MAAM,EAAE,CAAC;IACtF,CAAC;CACF;AAjGD,0CAiGC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* types.ts — Renderer-safe exports (no Node.js built-in imports)
|
|
3
|
+
*
|
|
4
|
+
* This entry point exports only interfaces, type aliases, enums, and
|
|
5
|
+
* plain-object constants. It is safe to import from renderer/browser
|
|
6
|
+
* code that cannot access Node.js modules like fs, path, child_process.
|
|
7
|
+
*
|
|
8
|
+
* Usage: import { ... } from "@prbe/electron-sdk/types"
|
|
9
|
+
*/
|
|
10
|
+
export { InteractionType, type AskQuestionPayload, type RequestPermissionPayload, type RequestPathAccessPayload, type InteractionPayload, type AskQuestionResponse, type RequestPermissionResponse, type RequestPathAccessResponse, type InteractionResponse, type PRBEInteractionRequester, type PRBEInteractionHandler, } from "./interactions";
|
|
11
|
+
export { WSMessageType, type WSMessage, ToolParamType, ToolName, type PRBEToolParameter, type PRBEToolDeclaration, PRBEAgentConfigKey, type PRBEAgentConfig, PRBEAgentStatusType, type PRBEAgentStatus, PRBEAgentErrorType, type PRBEStatusEvent, type PRBECRInvestigation, type PRBECompletedInvestigation, type FlaggedFileIn, type InvestigationResult, type PollRequest, type PollResponse, type ContextRequestOut, type TicketStatusOut, type TicketInfoRequest, type TicketInfoOut, type TicketInfoResponse, API_URL, MIDDLEWARE_URL, } from "./models";
|
|
12
|
+
export { type PRBESerializedCR, type PRBESerializedTicket, type PRBESerializedCompletedInvestigation, type PRBESerializedState, DEFAULT_PRBE_STATE, } from "./serialization";
|
|
13
|
+
export { PRBEStateEvent } from "./state";
|
|
14
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EACL,eAAe,EACf,KAAK,kBAAkB,EACvB,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,yBAAyB,EAC9B,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,GAC5B,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,aAAa,EACb,KAAK,SAAS,EACd,aAAa,EACb,QAAQ,EACR,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,kBAAkB,EAClB,KAAK,eAAe,EACpB,mBAAmB,EACnB,KAAK,eAAe,EACpB,kBAAkB,EAClB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,0BAA0B,EAC/B,KAAK,aAAa,EAClB,KAAK,mBAAmB,EACxB,KAAK,WAAW,EAChB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,aAAa,EAClB,KAAK,kBAAkB,EACvB,OAAO,EACP,cAAc,GACf,MAAM,UAAU,CAAC;AAGlB,OAAO,EACL,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,oCAAoC,EACzC,KAAK,mBAAmB,EACxB,kBAAkB,GACnB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* types.ts — Renderer-safe exports (no Node.js built-in imports)
|
|
4
|
+
*
|
|
5
|
+
* This entry point exports only interfaces, type aliases, enums, and
|
|
6
|
+
* plain-object constants. It is safe to import from renderer/browser
|
|
7
|
+
* code that cannot access Node.js modules like fs, path, child_process.
|
|
8
|
+
*
|
|
9
|
+
* Usage: import { ... } from "@prbe/electron-sdk/types"
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.PRBEStateEvent = exports.DEFAULT_PRBE_STATE = exports.MIDDLEWARE_URL = exports.API_URL = exports.PRBEAgentErrorType = exports.PRBEAgentStatusType = exports.PRBEAgentConfigKey = exports.ToolName = exports.ToolParamType = exports.WSMessageType = exports.InteractionType = void 0;
|
|
13
|
+
// Interactions — enums + interfaces (no Node imports)
|
|
14
|
+
var interactions_1 = require("./interactions");
|
|
15
|
+
Object.defineProperty(exports, "InteractionType", { enumerable: true, get: function () { return interactions_1.InteractionType; } });
|
|
16
|
+
// Models — enums + interfaces (no Node imports, no class exports)
|
|
17
|
+
var models_1 = require("./models");
|
|
18
|
+
Object.defineProperty(exports, "WSMessageType", { enumerable: true, get: function () { return models_1.WSMessageType; } });
|
|
19
|
+
Object.defineProperty(exports, "ToolParamType", { enumerable: true, get: function () { return models_1.ToolParamType; } });
|
|
20
|
+
Object.defineProperty(exports, "ToolName", { enumerable: true, get: function () { return models_1.ToolName; } });
|
|
21
|
+
Object.defineProperty(exports, "PRBEAgentConfigKey", { enumerable: true, get: function () { return models_1.PRBEAgentConfigKey; } });
|
|
22
|
+
Object.defineProperty(exports, "PRBEAgentStatusType", { enumerable: true, get: function () { return models_1.PRBEAgentStatusType; } });
|
|
23
|
+
Object.defineProperty(exports, "PRBEAgentErrorType", { enumerable: true, get: function () { return models_1.PRBEAgentErrorType; } });
|
|
24
|
+
Object.defineProperty(exports, "API_URL", { enumerable: true, get: function () { return models_1.API_URL; } });
|
|
25
|
+
Object.defineProperty(exports, "MIDDLEWARE_URL", { enumerable: true, get: function () { return models_1.MIDDLEWARE_URL; } });
|
|
26
|
+
// Serialization — interfaces + plain constants (no Node imports)
|
|
27
|
+
var serialization_1 = require("./serialization");
|
|
28
|
+
Object.defineProperty(exports, "DEFAULT_PRBE_STATE", { enumerable: true, get: function () { return serialization_1.DEFAULT_PRBE_STATE; } });
|
|
29
|
+
// State events enum (no Node imports — just re-export the enum)
|
|
30
|
+
var state_1 = require("./state");
|
|
31
|
+
Object.defineProperty(exports, "PRBEStateEvent", { enumerable: true, get: function () { return state_1.PRBEStateEvent; } });
|
|
32
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AAEH,sDAAsD;AACtD,+CAYwB;AAXtB,+GAAA,eAAe,OAAA;AAajB,kEAAkE;AAClE,mCA0BkB;AAzBhB,uGAAA,aAAa,OAAA;AAEb,uGAAA,aAAa,OAAA;AACb,kGAAA,QAAQ,OAAA;AAGR,4GAAA,kBAAkB,OAAA;AAElB,6GAAA,mBAAmB,OAAA;AAEnB,4GAAA,kBAAkB,OAAA;AAalB,iGAAA,OAAO,OAAA;AACP,wGAAA,cAAc,OAAA;AAGhB,iEAAiE;AACjE,iDAMyB;AADvB,mHAAA,kBAAkB,OAAA;AAGpB,gEAAgE;AAChE,iCAAyC;AAAhC,uGAAA,cAAc,OAAA"}
|
package/package.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@prbe.ai/electron-sdk",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "PRBE debug agent SDK for Electron apps",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"types": "./dist/index.d.ts",
|
|
10
|
+
"default": "./dist/index.js"
|
|
11
|
+
},
|
|
12
|
+
"./types": {
|
|
13
|
+
"types": "./dist/types.d.ts",
|
|
14
|
+
"default": "./dist/types.js"
|
|
15
|
+
},
|
|
16
|
+
"./assets/*": "./src/assets/*"
|
|
17
|
+
},
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "tsc",
|
|
20
|
+
"typecheck": "tsc --noEmit",
|
|
21
|
+
"clean": "rm -rf dist"
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"dist",
|
|
25
|
+
"src/assets/*.svg"
|
|
26
|
+
],
|
|
27
|
+
"license": "MIT",
|
|
28
|
+
"engines": {
|
|
29
|
+
"node": ">=18"
|
|
30
|
+
},
|
|
31
|
+
"devDependencies": {
|
|
32
|
+
"typescript": "^5.7.0",
|
|
33
|
+
"@types/node": "^20.0.0"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg width="256" height="256" viewBox="0 0 256 256" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path d="M50 112 L114 148 L50 184 Z" fill="#111111" opacity="0.07"/>
|
|
3
|
+
<path d="M70 86 L148 134 L70 182 Z" fill="#111111" opacity="0.18"/>
|
|
4
|
+
<path d="M92 56 L192 118 L92 180 Z" fill="#111111"/>
|
|
5
|
+
</svg>
|