@mseep/vessel-browser 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/LICENSE +21 -0
- package/README.md +578 -0
- package/bin/vessel-browser.js +25 -0
- package/out/main/index.js +35403 -0
- package/out/preload/content-script.js +3618 -0
- package/out/preload/index.js +737 -0
- package/out/renderer/assets/index-C8XANwcP.css +8543 -0
- package/out/renderer/assets/index-DO3Y7T4m.js +15656 -0
- package/out/renderer/assets/vessel-logo-transparent-IT25qr-Z.png +0 -0
- package/out/renderer/index.html +14 -0
- package/package.json +119 -0
- package/resources/vessel-icon.png +0 -0
|
@@ -0,0 +1,737 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const electron = require("electron");
|
|
3
|
+
const AIChannels = {
|
|
4
|
+
AI_QUERY: "ai:query",
|
|
5
|
+
AI_STREAM_START: "ai:stream-start",
|
|
6
|
+
AI_STREAM_CHUNK: "ai:stream-chunk",
|
|
7
|
+
AI_STREAM_END: "ai:stream-end",
|
|
8
|
+
AI_STREAM_IDLE: "ai:stream-idle",
|
|
9
|
+
AI_RESEARCH_CLARIFICATION: "ai:research-clarification",
|
|
10
|
+
AI_CANCEL: "ai:cancel",
|
|
11
|
+
AI_FETCH_MODELS: "ai:fetch-models",
|
|
12
|
+
AGENT_RUNTIME_GET: "agent-runtime:get",
|
|
13
|
+
AGENT_RUNTIME_UPDATE: "agent-runtime:update",
|
|
14
|
+
AGENT_PAUSE: "agent:pause",
|
|
15
|
+
AGENT_RESUME: "agent:resume",
|
|
16
|
+
AGENT_SET_APPROVAL_MODE: "agent:set-approval-mode",
|
|
17
|
+
AGENT_APPROVAL_RESOLVE: "agent:approval-resolve",
|
|
18
|
+
AGENT_CHECKPOINT_CREATE: "agent:checkpoint-create",
|
|
19
|
+
AGENT_CHECKPOINT_RESTORE: "agent:checkpoint-restore",
|
|
20
|
+
AGENT_CHECKPOINT_UPDATE_NOTE: "agent:checkpoint-update-note",
|
|
21
|
+
AGENT_UNDO_LAST_ACTION: "agent:undo-last-action",
|
|
22
|
+
AGENT_SESSION_CAPTURE: "agent:session-capture",
|
|
23
|
+
AGENT_SESSION_RESTORE: "agent:session-restore",
|
|
24
|
+
AGENT_TASK_START: "agent:task-start",
|
|
25
|
+
AGENT_TASK_UPDATE: "agent:task-update",
|
|
26
|
+
AGENT_TASK_NOTE: "agent:task-note",
|
|
27
|
+
AGENT_TASK_BLOCKER: "agent:task-blocker",
|
|
28
|
+
AGENT_TASK_RESOLVE: "agent:task-resolve",
|
|
29
|
+
AGENT_TASK_ABANDON: "agent:task-abandon",
|
|
30
|
+
AGENT_TASK_CLEAR: "agent:task-clear"
|
|
31
|
+
};
|
|
32
|
+
const AutofillChannels = {
|
|
33
|
+
AUTOFILL_LIST: "autofill:list",
|
|
34
|
+
AUTOFILL_ADD: "autofill:add",
|
|
35
|
+
AUTOFILL_UPDATE: "autofill:update",
|
|
36
|
+
AUTOFILL_DELETE: "autofill:delete",
|
|
37
|
+
AUTOFILL_FILL: "autofill:fill"
|
|
38
|
+
};
|
|
39
|
+
const AutomationChannels = {
|
|
40
|
+
AUTOMATION_GET_INSTALLED: "automation:get-installed",
|
|
41
|
+
AUTOMATION_INSTALL_FROM_FILE: "automation:install-from-file",
|
|
42
|
+
AUTOMATION_CREATE_FROM_TEXT: "automation:create-from-text",
|
|
43
|
+
AUTOMATION_UPDATE_FROM_TEXT: "automation:update-from-text",
|
|
44
|
+
AUTOMATION_UNINSTALL: "automation:uninstall",
|
|
45
|
+
AUTOMATION_ACTIVITY_START: "automation:activity-start",
|
|
46
|
+
AUTOMATION_ACTIVITY_CHUNK: "automation:activity-chunk",
|
|
47
|
+
AUTOMATION_ACTIVITY_END: "automation:activity-end",
|
|
48
|
+
SCHEDULE_GET_ALL: "schedule:get-all",
|
|
49
|
+
SCHEDULE_CREATE: "schedule:create",
|
|
50
|
+
SCHEDULE_UPDATE: "schedule:update",
|
|
51
|
+
SCHEDULE_DELETE: "schedule:delete",
|
|
52
|
+
SCHEDULE_JOBS_UPDATE: "schedule:jobs-update"
|
|
53
|
+
};
|
|
54
|
+
const BookmarkChannels = {
|
|
55
|
+
BOOKMARKS_GET: "bookmarks:get",
|
|
56
|
+
BOOKMARKS_UPDATE: "bookmarks:update",
|
|
57
|
+
BOOKMARK_SAVE: "bookmarks:save",
|
|
58
|
+
BOOKMARK_UPDATE: "bookmarks:update-item",
|
|
59
|
+
BOOKMARK_REMOVE: "bookmarks:remove",
|
|
60
|
+
BOOKMARKS_EXPORT_HTML: "bookmarks:export-html",
|
|
61
|
+
BOOKMARKS_EXPORT_JSON: "bookmarks:export-json",
|
|
62
|
+
BOOKMARKS_IMPORT_HTML: "bookmarks:import-html",
|
|
63
|
+
BOOKMARKS_IMPORT_JSON: "bookmarks:import-json",
|
|
64
|
+
BOOKMARK_ADD_CONTEXT_TO_CHAT: "bookmarks:add-context-to-chat",
|
|
65
|
+
FOLDER_CREATE: "bookmarks:folder-create",
|
|
66
|
+
FOLDER_REMOVE: "bookmarks:folder-remove",
|
|
67
|
+
FOLDER_RENAME: "bookmarks:folder-rename",
|
|
68
|
+
FOLDER_EXPORT_HTML: "bookmarks:folder-export-html"
|
|
69
|
+
};
|
|
70
|
+
const BrowsingDataChannels = {
|
|
71
|
+
CLEAR_BROWSING_DATA: "browsing-data:clear",
|
|
72
|
+
CLEAR_BROWSING_DATA_OPEN: "browsing-data:open"
|
|
73
|
+
};
|
|
74
|
+
const CodexChannels = {
|
|
75
|
+
CODEX_START_AUTH: "codex:start-auth",
|
|
76
|
+
CODEX_CANCEL_AUTH: "codex:cancel-auth",
|
|
77
|
+
CODEX_AUTH_STATUS: "codex:auth-status",
|
|
78
|
+
CODEX_DISCONNECT: "codex:disconnect"
|
|
79
|
+
};
|
|
80
|
+
const ContentChannels = {
|
|
81
|
+
CONTENT_EXTRACT: "content:extract",
|
|
82
|
+
READER_MODE_TOGGLE: "reader:toggle",
|
|
83
|
+
PAGE_DIFF_ACTIVITY: "page:diff-activity",
|
|
84
|
+
PAGE_CHANGED: "page:changed",
|
|
85
|
+
PAGE_DIFF_GET: "page:diff-get",
|
|
86
|
+
PAGE_DIFF_HISTORY: "page:diff-history",
|
|
87
|
+
PAGE_DIFF_DIRTY: "page:diff-dirty"
|
|
88
|
+
};
|
|
89
|
+
const DevToolsChannels = {
|
|
90
|
+
DEVTOOLS_PANEL_TOGGLE: "devtools-panel:toggle",
|
|
91
|
+
DEVTOOLS_PANEL_CLOSE: "devtools-panel:close",
|
|
92
|
+
DEVTOOLS_PANEL_OPEN_TAB: "devtools-panel:open-tab",
|
|
93
|
+
DEVTOOLS_PANEL_SELECT_TAB: "devtools-panel:select-tab",
|
|
94
|
+
DEVTOOLS_PANEL_STATE_GET: "devtools-panel:state-get",
|
|
95
|
+
DEVTOOLS_PANEL_STATE: "devtools-panel:state",
|
|
96
|
+
DEVTOOLS_PANEL_RESIZE_START: "devtools-panel:resize-start",
|
|
97
|
+
DEVTOOLS_PANEL_RESIZE: "devtools-panel:resize",
|
|
98
|
+
DEVTOOLS_PANEL_RESIZE_COMMIT: "devtools-panel:resize-commit",
|
|
99
|
+
DEVTOOLS_PANEL_POPOUT: "devtools-panel:popout",
|
|
100
|
+
DEVTOOLS_PANEL_DOCK: "devtools-panel:dock",
|
|
101
|
+
DEVTOOLS_PANEL_HOST_STATE_GET: "devtools-panel:host-state-get",
|
|
102
|
+
DEVTOOLS_PANEL_HOST_STATE: "devtools-panel:host-state",
|
|
103
|
+
DEVTOOLS_PAGE_MAP_REVEAL: "devtools-panel:page-map:reveal"
|
|
104
|
+
};
|
|
105
|
+
const DownloadChannels = {
|
|
106
|
+
DOWNLOAD_STARTED: "download:started",
|
|
107
|
+
DOWNLOAD_PROGRESS: "download:progress",
|
|
108
|
+
DOWNLOAD_DONE: "download:done",
|
|
109
|
+
DOWNLOADS_GET: "downloads:get",
|
|
110
|
+
DOWNLOADS_CLEAR: "downloads:clear",
|
|
111
|
+
DOWNLOADS_OPEN: "downloads:open",
|
|
112
|
+
DOWNLOADS_SHOW_IN_FOLDER: "downloads:show-in-folder",
|
|
113
|
+
DOWNLOADS_UPDATE: "downloads:update"
|
|
114
|
+
};
|
|
115
|
+
const HighlightChannels = {
|
|
116
|
+
HIGHLIGHT_CAPTURE: "highlights:capture",
|
|
117
|
+
HIGHLIGHT_CAPTURE_RESULT: "highlights:capture-result",
|
|
118
|
+
HIGHLIGHT_SELECTION: "vessel:highlight-selection",
|
|
119
|
+
HIGHLIGHT_NAV_COUNT: "highlights:nav-count",
|
|
120
|
+
HIGHLIGHT_COUNT_UPDATE: "highlights:count-update",
|
|
121
|
+
HIGHLIGHT_NAV_SCROLL: "highlights:nav-scroll",
|
|
122
|
+
HIGHLIGHT_NAV_REMOVE: "highlights:nav-remove",
|
|
123
|
+
HIGHLIGHT_NAV_CLEAR: "highlights:nav-clear",
|
|
124
|
+
SIDEBAR_HIGHLIGHT_ACTION: "highlights:sidebar-action"
|
|
125
|
+
};
|
|
126
|
+
const HistoryChannels = {
|
|
127
|
+
HISTORY_GET: "history:get",
|
|
128
|
+
HISTORY_LIST: "history:list",
|
|
129
|
+
HISTORY_SEARCH: "history:search",
|
|
130
|
+
HISTORY_CLEAR: "history:clear",
|
|
131
|
+
HISTORY_UPDATE: "history:update",
|
|
132
|
+
HISTORY_EXPORT_HTML: "history:export-html",
|
|
133
|
+
HISTORY_EXPORT_JSON: "history:export-json",
|
|
134
|
+
HISTORY_IMPORT: "history:import"
|
|
135
|
+
};
|
|
136
|
+
const HumanVaultChannels = {
|
|
137
|
+
HUMAN_VAULT_LIST: "human-vault:list",
|
|
138
|
+
HUMAN_VAULT_GET: "human-vault:get",
|
|
139
|
+
HUMAN_VAULT_SAVE: "human-vault:save",
|
|
140
|
+
HUMAN_VAULT_UPDATE: "human-vault:update",
|
|
141
|
+
HUMAN_VAULT_REMOVE: "human-vault:remove",
|
|
142
|
+
HUMAN_VAULT_AUDIT_LOG: "human-vault:audit-log"
|
|
143
|
+
};
|
|
144
|
+
const McpChannels = {
|
|
145
|
+
MCP_REGENERATE_TOKEN: "mcp:regenerate-token"
|
|
146
|
+
};
|
|
147
|
+
const OpenRouterChannels = {
|
|
148
|
+
OPENROUTER_START_AUTH: "openrouter:start-auth",
|
|
149
|
+
OPENROUTER_CANCEL_AUTH: "openrouter:cancel-auth",
|
|
150
|
+
OPENROUTER_AUTH_STATUS: "openrouter:auth-status"
|
|
151
|
+
};
|
|
152
|
+
const PermissionChannels = {
|
|
153
|
+
PERMISSIONS_GET: "permissions:get",
|
|
154
|
+
PERMISSIONS_CLEAR: "permissions:clear",
|
|
155
|
+
PERMISSIONS_CLEAR_ORIGIN: "permissions:clear-origin"
|
|
156
|
+
};
|
|
157
|
+
const PremiumChannels = {
|
|
158
|
+
PREMIUM_GET_STATE: "premium:get-state",
|
|
159
|
+
PREMIUM_ACTIVATION_START: "premium:activation-start",
|
|
160
|
+
PREMIUM_ACTIVATION_VERIFY: "premium:activation-verify",
|
|
161
|
+
PREMIUM_CHECKOUT: "premium:checkout",
|
|
162
|
+
PREMIUM_PORTAL: "premium:portal",
|
|
163
|
+
PREMIUM_RESET: "premium:reset",
|
|
164
|
+
PREMIUM_TRACK_CONTEXT: "premium:track-context",
|
|
165
|
+
PREMIUM_UPDATE: "premium:update"
|
|
166
|
+
};
|
|
167
|
+
const ResearchChannels = {
|
|
168
|
+
RESEARCH_STATE_GET: "research:state-get",
|
|
169
|
+
RESEARCH_STATE_UPDATE: "research:state-update",
|
|
170
|
+
RESEARCH_START_BRIEF: "research:start-brief",
|
|
171
|
+
RESEARCH_CONFIRM_BRIEF: "research:confirm-brief",
|
|
172
|
+
RESEARCH_APPROVE_OBJECTIVES: "research:approve-objectives",
|
|
173
|
+
RESEARCH_SET_MODE: "research:set-mode",
|
|
174
|
+
RESEARCH_SET_TRACES: "research:set-traces",
|
|
175
|
+
RESEARCH_CANCEL: "research:cancel",
|
|
176
|
+
RESEARCH_STOP_AND_SYNTHESIZE: "research:stop-and-synthesize",
|
|
177
|
+
RESEARCH_EXPORT_REPORT: "research:export-report"
|
|
178
|
+
};
|
|
179
|
+
const SecurityChannels = {
|
|
180
|
+
SECURITY_STATE_UPDATE: "security:state-update",
|
|
181
|
+
SECURITY_SHOW_DETAILS: "security:show-details",
|
|
182
|
+
SECURITY_PROCEED_ANYWAY: "security:proceed-anyway",
|
|
183
|
+
SECURITY_GO_BACK_TO_SAFETY: "security:go-back-to-safety"
|
|
184
|
+
};
|
|
185
|
+
const SessionChannels = {
|
|
186
|
+
SESSION_LIST: "session:list",
|
|
187
|
+
SESSION_SAVE: "session:save",
|
|
188
|
+
SESSION_LOAD: "session:load",
|
|
189
|
+
SESSION_DELETE: "session:delete"
|
|
190
|
+
};
|
|
191
|
+
const SettingsChannels = {
|
|
192
|
+
SETTINGS_GET: "settings:get",
|
|
193
|
+
SETTINGS_SET: "settings:set",
|
|
194
|
+
SETTINGS_UPDATE: "settings:update",
|
|
195
|
+
SETTINGS_HEALTH_GET: "settings:health:get",
|
|
196
|
+
SETTINGS_HEALTH_UPDATE: "settings:health:update"
|
|
197
|
+
};
|
|
198
|
+
const SupportChannels = {
|
|
199
|
+
SUPPORT_SUBMIT_FEEDBACK: "support:submit-feedback"
|
|
200
|
+
};
|
|
201
|
+
const TabChannels = {
|
|
202
|
+
TAB_CREATE: "tab:create",
|
|
203
|
+
TAB_CLOSE: "tab:close",
|
|
204
|
+
TAB_SWITCH: "tab:switch",
|
|
205
|
+
TAB_NAVIGATE: "tab:navigate",
|
|
206
|
+
TAB_BACK: "tab:back",
|
|
207
|
+
TAB_FORWARD: "tab:forward",
|
|
208
|
+
TAB_RELOAD: "tab:reload",
|
|
209
|
+
TAB_STATE_GET: "tab:state-get",
|
|
210
|
+
TAB_STATE_UPDATE: "tab:state-update",
|
|
211
|
+
RENDERER_VIEW_READY: "renderer:view-ready",
|
|
212
|
+
TAB_TOGGLE_AD_BLOCK: "tab:toggle-ad-block",
|
|
213
|
+
TAB_ZOOM_IN: "tab:zoom-in",
|
|
214
|
+
TAB_ZOOM_OUT: "tab:zoom-out",
|
|
215
|
+
TAB_ZOOM_RESET: "tab:zoom-reset",
|
|
216
|
+
TAB_REOPEN_CLOSED: "tab:reopen-closed",
|
|
217
|
+
TAB_DUPLICATE: "tab:duplicate",
|
|
218
|
+
TAB_CONTEXT_MENU: "tab:context-menu",
|
|
219
|
+
TAB_PIN: "tab:pin",
|
|
220
|
+
TAB_UNPIN: "tab:unpin",
|
|
221
|
+
TAB_GROUP_CREATE: "tab-group:create",
|
|
222
|
+
TAB_GROUP_ADD_TAB: "tab-group:add-tab",
|
|
223
|
+
TAB_GROUP_REMOVE_TAB: "tab-group:remove-tab",
|
|
224
|
+
TAB_GROUP_TOGGLE_COLLAPSED: "tab-group:toggle-collapsed",
|
|
225
|
+
TAB_GROUP_SET_COLOR: "tab-group:set-color",
|
|
226
|
+
TAB_GROUP_CONTEXT_MENU: "tab-group:context-menu",
|
|
227
|
+
TAB_TOGGLE_MUTE: "tab:toggle-mute",
|
|
228
|
+
TAB_PRINT: "tab:print",
|
|
229
|
+
TAB_PRINT_TO_PDF: "tab:print-to-pdf",
|
|
230
|
+
TAB_TOGGLE_PIP: "tab:toggle-pip"
|
|
231
|
+
};
|
|
232
|
+
const UIChannels = {
|
|
233
|
+
SIDEBAR_TOGGLE: "ui:sidebar-toggle",
|
|
234
|
+
SIDEBAR_NAVIGATE: "ui:sidebar-navigate",
|
|
235
|
+
SIDEBAR_RESIZE: "ui:sidebar-resize",
|
|
236
|
+
SIDEBAR_RESIZE_START: "ui:sidebar-resize-start",
|
|
237
|
+
SIDEBAR_RESIZE_COMMIT: "ui:sidebar-resize-commit",
|
|
238
|
+
SIDEBAR_POPOUT: "ui:sidebar-popout",
|
|
239
|
+
SIDEBAR_DOCK: "ui:sidebar-dock",
|
|
240
|
+
SIDEBAR_STATE_UPDATE: "ui:sidebar-state-update",
|
|
241
|
+
SIDEBAR_CONTEXT_MENU: "ui:sidebar-context-menu",
|
|
242
|
+
FOCUS_MODE_TOGGLE: "ui:focus-mode-toggle",
|
|
243
|
+
SETTINGS_VISIBILITY: "ui:settings-visibility"
|
|
244
|
+
};
|
|
245
|
+
const UpdateChannels = {
|
|
246
|
+
UPDATES_CHECK: "updates:check",
|
|
247
|
+
UPDATES_OPEN_DOWNLOAD: "updates:open-download"
|
|
248
|
+
};
|
|
249
|
+
const VaultChannels = {
|
|
250
|
+
VAULT_LIST: "vault:list",
|
|
251
|
+
VAULT_ADD: "vault:add",
|
|
252
|
+
VAULT_UPDATE: "vault:update",
|
|
253
|
+
VAULT_REMOVE: "vault:remove",
|
|
254
|
+
VAULT_AUDIT_LOG: "vault:audit-log"
|
|
255
|
+
};
|
|
256
|
+
const WindowControlChannels = {
|
|
257
|
+
WINDOW_MINIMIZE: "window:minimize",
|
|
258
|
+
WINDOW_MAXIMIZE: "window:maximize",
|
|
259
|
+
WINDOW_CLOSE: "window:close",
|
|
260
|
+
OPEN_NEW_WINDOW: "window:open-new",
|
|
261
|
+
OPEN_PRIVATE_WINDOW: "private:open-window",
|
|
262
|
+
IS_PRIVATE_MODE: "private:is-private",
|
|
263
|
+
FIND_IN_PAGE_START: "find:start",
|
|
264
|
+
FIND_IN_PAGE_NEXT: "find:next",
|
|
265
|
+
FIND_IN_PAGE_STOP: "find:stop",
|
|
266
|
+
FIND_IN_PAGE_RESULT: "find:result"
|
|
267
|
+
};
|
|
268
|
+
const Channels = {
|
|
269
|
+
...AIChannels,
|
|
270
|
+
...AutofillChannels,
|
|
271
|
+
...AutomationChannels,
|
|
272
|
+
...BookmarkChannels,
|
|
273
|
+
...BrowsingDataChannels,
|
|
274
|
+
...CodexChannels,
|
|
275
|
+
...ContentChannels,
|
|
276
|
+
...DevToolsChannels,
|
|
277
|
+
...DownloadChannels,
|
|
278
|
+
...HighlightChannels,
|
|
279
|
+
...HistoryChannels,
|
|
280
|
+
...HumanVaultChannels,
|
|
281
|
+
...McpChannels,
|
|
282
|
+
...OpenRouterChannels,
|
|
283
|
+
...PermissionChannels,
|
|
284
|
+
...PremiumChannels,
|
|
285
|
+
...ResearchChannels,
|
|
286
|
+
...SecurityChannels,
|
|
287
|
+
...SessionChannels,
|
|
288
|
+
...SettingsChannels,
|
|
289
|
+
...SupportChannels,
|
|
290
|
+
...TabChannels,
|
|
291
|
+
...UIChannels,
|
|
292
|
+
...UpdateChannels,
|
|
293
|
+
...VaultChannels,
|
|
294
|
+
...WindowControlChannels
|
|
295
|
+
};
|
|
296
|
+
const api = {
|
|
297
|
+
tabs: {
|
|
298
|
+
create: (url) => electron.ipcRenderer.invoke(Channels.TAB_CREATE, url),
|
|
299
|
+
close: (id) => electron.ipcRenderer.invoke(Channels.TAB_CLOSE, id),
|
|
300
|
+
switch: (id) => electron.ipcRenderer.invoke(Channels.TAB_SWITCH, id),
|
|
301
|
+
navigate: (id, url, postBody) => electron.ipcRenderer.invoke(Channels.TAB_NAVIGATE, id, url, postBody),
|
|
302
|
+
back: (id) => electron.ipcRenderer.invoke(Channels.TAB_BACK, id),
|
|
303
|
+
forward: (id) => electron.ipcRenderer.invoke(Channels.TAB_FORWARD, id),
|
|
304
|
+
reload: (id) => electron.ipcRenderer.invoke(Channels.TAB_RELOAD, id),
|
|
305
|
+
toggleAdBlock: (id) => electron.ipcRenderer.invoke(Channels.TAB_TOGGLE_AD_BLOCK, id),
|
|
306
|
+
zoomIn: (id) => electron.ipcRenderer.invoke(Channels.TAB_ZOOM_IN, id),
|
|
307
|
+
zoomOut: (id) => electron.ipcRenderer.invoke(Channels.TAB_ZOOM_OUT, id),
|
|
308
|
+
zoomReset: (id) => electron.ipcRenderer.invoke(Channels.TAB_ZOOM_RESET, id),
|
|
309
|
+
reopenClosed: () => electron.ipcRenderer.invoke(Channels.TAB_REOPEN_CLOSED),
|
|
310
|
+
duplicate: (id) => electron.ipcRenderer.invoke(Channels.TAB_DUPLICATE, id),
|
|
311
|
+
showContextMenu: (id) => electron.ipcRenderer.send(Channels.TAB_CONTEXT_MENU, id),
|
|
312
|
+
openPrivateWindow: () => electron.ipcRenderer.invoke(Channels.OPEN_PRIVATE_WINDOW),
|
|
313
|
+
isPrivateMode: () => electron.ipcRenderer.invoke(Channels.IS_PRIVATE_MODE),
|
|
314
|
+
pin: (id) => electron.ipcRenderer.invoke(Channels.TAB_PIN, id),
|
|
315
|
+
unpin: (id) => electron.ipcRenderer.invoke(Channels.TAB_UNPIN, id),
|
|
316
|
+
createGroup: (id) => electron.ipcRenderer.invoke(Channels.TAB_GROUP_CREATE, id),
|
|
317
|
+
addToGroup: (id, groupId) => electron.ipcRenderer.invoke(Channels.TAB_GROUP_ADD_TAB, id, groupId),
|
|
318
|
+
removeFromGroup: (id) => electron.ipcRenderer.invoke(Channels.TAB_GROUP_REMOVE_TAB, id),
|
|
319
|
+
toggleGroupCollapsed: (groupId) => electron.ipcRenderer.invoke(Channels.TAB_GROUP_TOGGLE_COLLAPSED, groupId),
|
|
320
|
+
setGroupColor: (groupId, color) => electron.ipcRenderer.invoke(Channels.TAB_GROUP_SET_COLOR, groupId, color),
|
|
321
|
+
showGroupContextMenu: (groupId) => electron.ipcRenderer.send(Channels.TAB_GROUP_CONTEXT_MENU, groupId),
|
|
322
|
+
toggleMute: (id) => electron.ipcRenderer.invoke(Channels.TAB_TOGGLE_MUTE, id),
|
|
323
|
+
print: (id) => electron.ipcRenderer.invoke(Channels.TAB_PRINT, id),
|
|
324
|
+
printToPdf: (id) => electron.ipcRenderer.invoke(Channels.TAB_PRINT_TO_PDF, id),
|
|
325
|
+
openNewWindow: () => electron.ipcRenderer.invoke(Channels.OPEN_NEW_WINDOW),
|
|
326
|
+
getState: () => electron.ipcRenderer.invoke(Channels.TAB_STATE_GET),
|
|
327
|
+
onStateUpdate: (cb) => {
|
|
328
|
+
const handler = (_, tabs, activeId) => cb(tabs, activeId);
|
|
329
|
+
electron.ipcRenderer.on(Channels.TAB_STATE_UPDATE, handler);
|
|
330
|
+
return () => electron.ipcRenderer.removeListener(Channels.TAB_STATE_UPDATE, handler);
|
|
331
|
+
}
|
|
332
|
+
},
|
|
333
|
+
ai: {
|
|
334
|
+
query: (prompt, history) => electron.ipcRenderer.invoke(Channels.AI_QUERY, prompt, history),
|
|
335
|
+
onStreamStart: (cb) => {
|
|
336
|
+
const handler = (_, prompt) => cb(prompt);
|
|
337
|
+
electron.ipcRenderer.on(Channels.AI_STREAM_START, handler);
|
|
338
|
+
return () => electron.ipcRenderer.removeListener(Channels.AI_STREAM_START, handler);
|
|
339
|
+
},
|
|
340
|
+
onStreamChunk: (cb) => {
|
|
341
|
+
const handler = (_, chunk) => cb(chunk);
|
|
342
|
+
electron.ipcRenderer.on(Channels.AI_STREAM_CHUNK, handler);
|
|
343
|
+
return () => electron.ipcRenderer.removeListener(Channels.AI_STREAM_CHUNK, handler);
|
|
344
|
+
},
|
|
345
|
+
onStreamEnd: (cb) => {
|
|
346
|
+
const handler = (_, status = "completed") => cb(status);
|
|
347
|
+
electron.ipcRenderer.on(Channels.AI_STREAM_END, handler);
|
|
348
|
+
return () => electron.ipcRenderer.removeListener(Channels.AI_STREAM_END, handler);
|
|
349
|
+
},
|
|
350
|
+
onStreamIdle: (cb) => {
|
|
351
|
+
const handler = () => cb();
|
|
352
|
+
electron.ipcRenderer.on(Channels.AI_STREAM_IDLE, handler);
|
|
353
|
+
return () => electron.ipcRenderer.removeListener(Channels.AI_STREAM_IDLE, handler);
|
|
354
|
+
},
|
|
355
|
+
onResearchClarification: (cb) => {
|
|
356
|
+
const handler = (_, payload) => cb(payload);
|
|
357
|
+
electron.ipcRenderer.on(Channels.AI_RESEARCH_CLARIFICATION, handler);
|
|
358
|
+
return () => electron.ipcRenderer.removeListener(
|
|
359
|
+
Channels.AI_RESEARCH_CLARIFICATION,
|
|
360
|
+
handler
|
|
361
|
+
);
|
|
362
|
+
},
|
|
363
|
+
onAutomationActivityStart: (cb) => {
|
|
364
|
+
const handler = (_, entry) => cb(entry);
|
|
365
|
+
electron.ipcRenderer.on(Channels.AUTOMATION_ACTIVITY_START, handler);
|
|
366
|
+
return () => electron.ipcRenderer.removeListener(Channels.AUTOMATION_ACTIVITY_START, handler);
|
|
367
|
+
},
|
|
368
|
+
onAutomationActivityChunk: (cb) => {
|
|
369
|
+
const handler = (_, payload) => cb(payload);
|
|
370
|
+
electron.ipcRenderer.on(Channels.AUTOMATION_ACTIVITY_CHUNK, handler);
|
|
371
|
+
return () => electron.ipcRenderer.removeListener(Channels.AUTOMATION_ACTIVITY_CHUNK, handler);
|
|
372
|
+
},
|
|
373
|
+
onAutomationActivityEnd: (cb) => {
|
|
374
|
+
const handler = (_, payload) => cb(payload);
|
|
375
|
+
electron.ipcRenderer.on(Channels.AUTOMATION_ACTIVITY_END, handler);
|
|
376
|
+
return () => electron.ipcRenderer.removeListener(Channels.AUTOMATION_ACTIVITY_END, handler);
|
|
377
|
+
},
|
|
378
|
+
cancel: () => electron.ipcRenderer.invoke(Channels.AI_CANCEL),
|
|
379
|
+
fetchModels: (config) => electron.ipcRenderer.invoke(Channels.AI_FETCH_MODELS, config),
|
|
380
|
+
getRuntime: () => electron.ipcRenderer.invoke(Channels.AGENT_RUNTIME_GET),
|
|
381
|
+
onRuntimeUpdate: (cb) => {
|
|
382
|
+
const handler = (_, state) => cb(state);
|
|
383
|
+
electron.ipcRenderer.on(Channels.AGENT_RUNTIME_UPDATE, handler);
|
|
384
|
+
return () => electron.ipcRenderer.removeListener(Channels.AGENT_RUNTIME_UPDATE, handler);
|
|
385
|
+
},
|
|
386
|
+
pause: () => electron.ipcRenderer.invoke(Channels.AGENT_PAUSE),
|
|
387
|
+
resume: () => electron.ipcRenderer.invoke(Channels.AGENT_RESUME),
|
|
388
|
+
setApprovalMode: (mode) => electron.ipcRenderer.invoke(Channels.AGENT_SET_APPROVAL_MODE, mode),
|
|
389
|
+
resolveApproval: (approvalId, approved) => electron.ipcRenderer.invoke(Channels.AGENT_APPROVAL_RESOLVE, approvalId, approved),
|
|
390
|
+
createCheckpoint: (name, note) => electron.ipcRenderer.invoke(Channels.AGENT_CHECKPOINT_CREATE, name, note),
|
|
391
|
+
restoreCheckpoint: (checkpointId) => electron.ipcRenderer.invoke(Channels.AGENT_CHECKPOINT_RESTORE, checkpointId),
|
|
392
|
+
updateCheckpointNote: (checkpointId, note) => electron.ipcRenderer.invoke(Channels.AGENT_CHECKPOINT_UPDATE_NOTE, checkpointId, note),
|
|
393
|
+
undoLastAction: () => electron.ipcRenderer.invoke(Channels.AGENT_UNDO_LAST_ACTION),
|
|
394
|
+
captureSession: (note) => electron.ipcRenderer.invoke(Channels.AGENT_SESSION_CAPTURE, note),
|
|
395
|
+
restoreSession: (snapshot) => electron.ipcRenderer.invoke(Channels.AGENT_SESSION_RESTORE, snapshot),
|
|
396
|
+
startTaskMemory: (goal) => electron.ipcRenderer.invoke(Channels.AGENT_TASK_START, goal),
|
|
397
|
+
updateTaskMemory: (patch) => electron.ipcRenderer.invoke(Channels.AGENT_TASK_UPDATE, patch),
|
|
398
|
+
addTaskNote: (text) => electron.ipcRenderer.invoke(Channels.AGENT_TASK_NOTE, text),
|
|
399
|
+
setTaskBlocker: (blocker) => electron.ipcRenderer.invoke(Channels.AGENT_TASK_BLOCKER, blocker),
|
|
400
|
+
resolveTaskMemory: (summary) => electron.ipcRenderer.invoke(Channels.AGENT_TASK_RESOLVE, summary),
|
|
401
|
+
abandonTaskMemory: (reason) => electron.ipcRenderer.invoke(Channels.AGENT_TASK_ABANDON, reason),
|
|
402
|
+
clearTaskMemory: () => electron.ipcRenderer.invoke(Channels.AGENT_TASK_CLEAR)
|
|
403
|
+
},
|
|
404
|
+
research: {
|
|
405
|
+
getState: () => electron.ipcRenderer.invoke(Channels.RESEARCH_STATE_GET),
|
|
406
|
+
onStateUpdate: (cb) => {
|
|
407
|
+
const handler = (_, state) => cb(state);
|
|
408
|
+
electron.ipcRenderer.on(Channels.RESEARCH_STATE_UPDATE, handler);
|
|
409
|
+
return () => electron.ipcRenderer.removeListener(Channels.RESEARCH_STATE_UPDATE, handler);
|
|
410
|
+
},
|
|
411
|
+
startBrief: (query) => electron.ipcRenderer.invoke(Channels.RESEARCH_START_BRIEF, query),
|
|
412
|
+
confirmBrief: () => electron.ipcRenderer.invoke(Channels.RESEARCH_CONFIRM_BRIEF),
|
|
413
|
+
approveObjectives: (options) => electron.ipcRenderer.invoke(Channels.RESEARCH_APPROVE_OBJECTIVES, options ?? {}),
|
|
414
|
+
setMode: (mode) => electron.ipcRenderer.invoke(Channels.RESEARCH_SET_MODE, mode),
|
|
415
|
+
setTraces: (include) => electron.ipcRenderer.invoke(Channels.RESEARCH_SET_TRACES, include),
|
|
416
|
+
cancel: () => electron.ipcRenderer.invoke(Channels.RESEARCH_CANCEL),
|
|
417
|
+
stopAndSynthesize: () => electron.ipcRenderer.invoke(Channels.RESEARCH_STOP_AND_SYNTHESIZE),
|
|
418
|
+
exportReport: () => electron.ipcRenderer.invoke(Channels.RESEARCH_EXPORT_REPORT)
|
|
419
|
+
},
|
|
420
|
+
content: {
|
|
421
|
+
extract: () => electron.ipcRenderer.invoke(Channels.CONTENT_EXTRACT),
|
|
422
|
+
toggleReader: () => electron.ipcRenderer.invoke(Channels.READER_MODE_TOGGLE)
|
|
423
|
+
},
|
|
424
|
+
highlights: {
|
|
425
|
+
capture: () => electron.ipcRenderer.invoke(Channels.HIGHLIGHT_CAPTURE),
|
|
426
|
+
onCaptureResult: (cb) => {
|
|
427
|
+
const handler = (_, result) => cb(result);
|
|
428
|
+
electron.ipcRenderer.on(Channels.HIGHLIGHT_CAPTURE_RESULT, handler);
|
|
429
|
+
return () => electron.ipcRenderer.removeListener(Channels.HIGHLIGHT_CAPTURE_RESULT, handler);
|
|
430
|
+
},
|
|
431
|
+
getCount: () => electron.ipcRenderer.invoke(Channels.HIGHLIGHT_NAV_COUNT),
|
|
432
|
+
onCountUpdate: (cb) => {
|
|
433
|
+
const handler = (_, count) => cb(count);
|
|
434
|
+
electron.ipcRenderer.on(Channels.HIGHLIGHT_COUNT_UPDATE, handler);
|
|
435
|
+
return () => electron.ipcRenderer.removeListener(Channels.HIGHLIGHT_COUNT_UPDATE, handler);
|
|
436
|
+
},
|
|
437
|
+
scrollTo: (index) => electron.ipcRenderer.invoke(Channels.HIGHLIGHT_NAV_SCROLL, index),
|
|
438
|
+
remove: (index) => electron.ipcRenderer.invoke(Channels.HIGHLIGHT_NAV_REMOVE, index),
|
|
439
|
+
clearAll: () => electron.ipcRenderer.invoke(Channels.HIGHLIGHT_NAV_CLEAR),
|
|
440
|
+
onSidebarAction: (cb) => {
|
|
441
|
+
const handler = (_, action) => cb(action);
|
|
442
|
+
electron.ipcRenderer.on(Channels.SIDEBAR_HIGHLIGHT_ACTION, handler);
|
|
443
|
+
return () => electron.ipcRenderer.removeListener(Channels.SIDEBAR_HIGHLIGHT_ACTION, handler);
|
|
444
|
+
}
|
|
445
|
+
},
|
|
446
|
+
ui: {
|
|
447
|
+
toggleSidebar: () => electron.ipcRenderer.invoke(Channels.SIDEBAR_TOGGLE),
|
|
448
|
+
openSidebarTab: (tab) => electron.ipcRenderer.invoke(Channels.SIDEBAR_NAVIGATE, tab),
|
|
449
|
+
startSidebarResize: () => electron.ipcRenderer.invoke(Channels.SIDEBAR_RESIZE_START),
|
|
450
|
+
resizeSidebar: (width) => electron.ipcRenderer.invoke(Channels.SIDEBAR_RESIZE, width),
|
|
451
|
+
commitSidebarResize: () => electron.ipcRenderer.invoke(Channels.SIDEBAR_RESIZE_COMMIT),
|
|
452
|
+
popOutSidebar: () => electron.ipcRenderer.invoke(Channels.SIDEBAR_POPOUT),
|
|
453
|
+
dockSidebar: () => electron.ipcRenderer.invoke(Channels.SIDEBAR_DOCK),
|
|
454
|
+
rendererReady: (view) => electron.ipcRenderer.send(Channels.RENDERER_VIEW_READY, view),
|
|
455
|
+
onSidebarContextMenu: (cb) => {
|
|
456
|
+
const handler = (_, position) => cb(position);
|
|
457
|
+
electron.ipcRenderer.on(Channels.SIDEBAR_CONTEXT_MENU, handler);
|
|
458
|
+
return () => electron.ipcRenderer.removeListener(Channels.SIDEBAR_CONTEXT_MENU, handler);
|
|
459
|
+
},
|
|
460
|
+
onSidebarNavigate: (cb) => {
|
|
461
|
+
const handler = (_, tab) => cb(tab);
|
|
462
|
+
electron.ipcRenderer.on(Channels.SIDEBAR_NAVIGATE, handler);
|
|
463
|
+
return () => electron.ipcRenderer.removeListener(Channels.SIDEBAR_NAVIGATE, handler);
|
|
464
|
+
},
|
|
465
|
+
onSidebarStateUpdate: (cb) => {
|
|
466
|
+
const handler = (_, state) => cb(state);
|
|
467
|
+
electron.ipcRenderer.on(Channels.SIDEBAR_STATE_UPDATE, handler);
|
|
468
|
+
return () => electron.ipcRenderer.removeListener(Channels.SIDEBAR_STATE_UPDATE, handler);
|
|
469
|
+
},
|
|
470
|
+
toggleFocusMode: () => electron.ipcRenderer.invoke(Channels.FOCUS_MODE_TOGGLE),
|
|
471
|
+
setSettingsVisibility: (open) => electron.ipcRenderer.invoke(Channels.SETTINGS_VISIBILITY, open)
|
|
472
|
+
},
|
|
473
|
+
settings: {
|
|
474
|
+
get: () => electron.ipcRenderer.invoke(Channels.SETTINGS_GET),
|
|
475
|
+
getHealth: () => electron.ipcRenderer.invoke(Channels.SETTINGS_HEALTH_GET),
|
|
476
|
+
regenerateMcpToken: () => electron.ipcRenderer.invoke(Channels.MCP_REGENERATE_TOKEN),
|
|
477
|
+
onHealthUpdate: (cb) => {
|
|
478
|
+
const handler = (_, health) => cb(health);
|
|
479
|
+
electron.ipcRenderer.on(Channels.SETTINGS_HEALTH_UPDATE, handler);
|
|
480
|
+
return () => electron.ipcRenderer.removeListener(Channels.SETTINGS_HEALTH_UPDATE, handler);
|
|
481
|
+
},
|
|
482
|
+
set: (key, value) => electron.ipcRenderer.invoke(Channels.SETTINGS_SET, key, value),
|
|
483
|
+
onUpdate: (cb) => {
|
|
484
|
+
const handler = (_, settings) => cb(settings);
|
|
485
|
+
electron.ipcRenderer.on(Channels.SETTINGS_UPDATE, handler);
|
|
486
|
+
return () => electron.ipcRenderer.removeListener(Channels.SETTINGS_UPDATE, handler);
|
|
487
|
+
}
|
|
488
|
+
},
|
|
489
|
+
support: {
|
|
490
|
+
submitFeedback: (email, message) => electron.ipcRenderer.invoke(Channels.SUPPORT_SUBMIT_FEEDBACK, email, message)
|
|
491
|
+
},
|
|
492
|
+
bookmarks: {
|
|
493
|
+
get: () => electron.ipcRenderer.invoke(Channels.BOOKMARKS_GET),
|
|
494
|
+
saveBookmark: (url, title, folderId, note, intent, expectedContent, keyFields, agentHints) => electron.ipcRenderer.invoke(
|
|
495
|
+
Channels.BOOKMARK_SAVE,
|
|
496
|
+
url,
|
|
497
|
+
title,
|
|
498
|
+
folderId,
|
|
499
|
+
note,
|
|
500
|
+
intent,
|
|
501
|
+
expectedContent,
|
|
502
|
+
keyFields,
|
|
503
|
+
agentHints
|
|
504
|
+
),
|
|
505
|
+
updateBookmark: (id, updates) => electron.ipcRenderer.invoke(Channels.BOOKMARK_UPDATE, id, updates),
|
|
506
|
+
removeBookmark: (id) => electron.ipcRenderer.invoke(Channels.BOOKMARK_REMOVE, id),
|
|
507
|
+
exportHtml: (options) => electron.ipcRenderer.invoke(Channels.BOOKMARKS_EXPORT_HTML, options),
|
|
508
|
+
exportJson: () => electron.ipcRenderer.invoke(Channels.BOOKMARKS_EXPORT_JSON),
|
|
509
|
+
exportFolderHtml: (folderId, options) => electron.ipcRenderer.invoke(Channels.FOLDER_EXPORT_HTML, folderId, options),
|
|
510
|
+
importHtml: () => electron.ipcRenderer.invoke(Channels.BOOKMARKS_IMPORT_HTML),
|
|
511
|
+
importJson: () => electron.ipcRenderer.invoke(Channels.BOOKMARKS_IMPORT_JSON),
|
|
512
|
+
createFolder: (name) => electron.ipcRenderer.invoke(Channels.FOLDER_CREATE, name),
|
|
513
|
+
createFolderWithSummary: (name, summary) => electron.ipcRenderer.invoke(Channels.FOLDER_CREATE, name, summary),
|
|
514
|
+
removeFolder: (id, deleteContents) => electron.ipcRenderer.invoke(Channels.FOLDER_REMOVE, id, deleteContents),
|
|
515
|
+
renameFolder: (id, newName, summary) => electron.ipcRenderer.invoke(Channels.FOLDER_RENAME, id, newName, summary),
|
|
516
|
+
onAddContextToChat: (cb) => {
|
|
517
|
+
const handler = (_, bookmarkId) => cb(bookmarkId);
|
|
518
|
+
electron.ipcRenderer.on(Channels.BOOKMARK_ADD_CONTEXT_TO_CHAT, handler);
|
|
519
|
+
return () => electron.ipcRenderer.removeListener(
|
|
520
|
+
Channels.BOOKMARK_ADD_CONTEXT_TO_CHAT,
|
|
521
|
+
handler
|
|
522
|
+
);
|
|
523
|
+
},
|
|
524
|
+
onUpdate: (cb) => {
|
|
525
|
+
const handler = (_, state) => cb(state);
|
|
526
|
+
electron.ipcRenderer.on(Channels.BOOKMARKS_UPDATE, handler);
|
|
527
|
+
return () => electron.ipcRenderer.removeListener(Channels.BOOKMARKS_UPDATE, handler);
|
|
528
|
+
}
|
|
529
|
+
},
|
|
530
|
+
devtoolsPanel: {
|
|
531
|
+
toggle: () => electron.ipcRenderer.invoke(Channels.DEVTOOLS_PANEL_TOGGLE),
|
|
532
|
+
close: () => electron.ipcRenderer.invoke(Channels.DEVTOOLS_PANEL_CLOSE),
|
|
533
|
+
openTab: (tab) => electron.ipcRenderer.invoke(Channels.DEVTOOLS_PANEL_OPEN_TAB, tab),
|
|
534
|
+
startResize: () => electron.ipcRenderer.invoke(Channels.DEVTOOLS_PANEL_RESIZE_START),
|
|
535
|
+
resize: (height) => electron.ipcRenderer.invoke(Channels.DEVTOOLS_PANEL_RESIZE, height),
|
|
536
|
+
commitResize: () => electron.ipcRenderer.invoke(Channels.DEVTOOLS_PANEL_RESIZE_COMMIT),
|
|
537
|
+
popOut: () => electron.ipcRenderer.invoke(Channels.DEVTOOLS_PANEL_POPOUT),
|
|
538
|
+
dock: () => electron.ipcRenderer.invoke(Channels.DEVTOOLS_PANEL_DOCK),
|
|
539
|
+
getState: () => electron.ipcRenderer.invoke(Channels.DEVTOOLS_PANEL_STATE_GET),
|
|
540
|
+
getHostState: () => electron.ipcRenderer.invoke(Channels.DEVTOOLS_PANEL_HOST_STATE_GET),
|
|
541
|
+
revealElement: (selector) => electron.ipcRenderer.invoke(Channels.DEVTOOLS_PAGE_MAP_REVEAL, { selector }),
|
|
542
|
+
onStateUpdate: (cb) => {
|
|
543
|
+
const handler = (_, state) => cb(state);
|
|
544
|
+
electron.ipcRenderer.on(Channels.DEVTOOLS_PANEL_STATE, handler);
|
|
545
|
+
return () => electron.ipcRenderer.removeListener(Channels.DEVTOOLS_PANEL_STATE, handler);
|
|
546
|
+
},
|
|
547
|
+
onHostStateUpdate: (cb) => {
|
|
548
|
+
const handler = (_, state) => cb(state);
|
|
549
|
+
electron.ipcRenderer.on(Channels.DEVTOOLS_PANEL_HOST_STATE, handler);
|
|
550
|
+
return () => electron.ipcRenderer.removeListener(Channels.DEVTOOLS_PANEL_HOST_STATE, handler);
|
|
551
|
+
},
|
|
552
|
+
onSelectTab: (cb) => {
|
|
553
|
+
const handler = (_, tab) => cb(tab);
|
|
554
|
+
electron.ipcRenderer.on(Channels.DEVTOOLS_PANEL_SELECT_TAB, handler);
|
|
555
|
+
return () => electron.ipcRenderer.removeListener(Channels.DEVTOOLS_PANEL_SELECT_TAB, handler);
|
|
556
|
+
}
|
|
557
|
+
},
|
|
558
|
+
find: {
|
|
559
|
+
start: (text, options) => electron.ipcRenderer.invoke(Channels.FIND_IN_PAGE_START, text, options),
|
|
560
|
+
next: (forward) => electron.ipcRenderer.invoke(Channels.FIND_IN_PAGE_NEXT, forward),
|
|
561
|
+
stop: (action) => electron.ipcRenderer.invoke(Channels.FIND_IN_PAGE_STOP, action),
|
|
562
|
+
onResult: (cb) => {
|
|
563
|
+
const handler = (_, result) => cb(result);
|
|
564
|
+
electron.ipcRenderer.on(Channels.FIND_IN_PAGE_RESULT, handler);
|
|
565
|
+
return () => electron.ipcRenderer.removeListener(Channels.FIND_IN_PAGE_RESULT, handler);
|
|
566
|
+
}
|
|
567
|
+
},
|
|
568
|
+
history: {
|
|
569
|
+
get: () => electron.ipcRenderer.invoke(Channels.HISTORY_GET),
|
|
570
|
+
list: (offset, limit) => electron.ipcRenderer.invoke(Channels.HISTORY_LIST, offset, limit),
|
|
571
|
+
search: (query) => electron.ipcRenderer.invoke(Channels.HISTORY_SEARCH, query),
|
|
572
|
+
clear: () => electron.ipcRenderer.invoke(Channels.HISTORY_CLEAR),
|
|
573
|
+
exportHtml: () => electron.ipcRenderer.invoke(Channels.HISTORY_EXPORT_HTML),
|
|
574
|
+
exportJson: () => electron.ipcRenderer.invoke(Channels.HISTORY_EXPORT_JSON),
|
|
575
|
+
importFile: () => electron.ipcRenderer.invoke(Channels.HISTORY_IMPORT),
|
|
576
|
+
onUpdate: (cb) => {
|
|
577
|
+
const handler = (_, state) => cb(state);
|
|
578
|
+
electron.ipcRenderer.on(Channels.HISTORY_UPDATE, handler);
|
|
579
|
+
return () => electron.ipcRenderer.removeListener(Channels.HISTORY_UPDATE, handler);
|
|
580
|
+
}
|
|
581
|
+
},
|
|
582
|
+
premium: {
|
|
583
|
+
getState: () => electron.ipcRenderer.invoke(Channels.PREMIUM_GET_STATE),
|
|
584
|
+
requestCode: (email) => electron.ipcRenderer.invoke(Channels.PREMIUM_ACTIVATION_START, email),
|
|
585
|
+
verifyCode: (email, code, challengeToken) => electron.ipcRenderer.invoke(
|
|
586
|
+
Channels.PREMIUM_ACTIVATION_VERIFY,
|
|
587
|
+
email,
|
|
588
|
+
code,
|
|
589
|
+
challengeToken
|
|
590
|
+
),
|
|
591
|
+
checkout: (email) => electron.ipcRenderer.invoke(Channels.PREMIUM_CHECKOUT, email),
|
|
592
|
+
portal: () => electron.ipcRenderer.invoke(Channels.PREMIUM_PORTAL),
|
|
593
|
+
reset: () => electron.ipcRenderer.invoke(Channels.PREMIUM_RESET),
|
|
594
|
+
trackContext: (step) => electron.ipcRenderer.invoke(Channels.PREMIUM_TRACK_CONTEXT, step),
|
|
595
|
+
onUpdate: (cb) => {
|
|
596
|
+
const handler = (_, state) => cb(state);
|
|
597
|
+
electron.ipcRenderer.on(Channels.PREMIUM_UPDATE, handler);
|
|
598
|
+
return () => electron.ipcRenderer.removeListener(Channels.PREMIUM_UPDATE, handler);
|
|
599
|
+
}
|
|
600
|
+
},
|
|
601
|
+
sessions: {
|
|
602
|
+
list: () => electron.ipcRenderer.invoke(Channels.SESSION_LIST),
|
|
603
|
+
save: (name) => electron.ipcRenderer.invoke(Channels.SESSION_SAVE, name),
|
|
604
|
+
load: (name) => electron.ipcRenderer.invoke(Channels.SESSION_LOAD, name),
|
|
605
|
+
delete: (name) => electron.ipcRenderer.invoke(Channels.SESSION_DELETE, name)
|
|
606
|
+
},
|
|
607
|
+
vault: {
|
|
608
|
+
list: () => electron.ipcRenderer.invoke(Channels.VAULT_LIST),
|
|
609
|
+
add: (entry) => electron.ipcRenderer.invoke(Channels.VAULT_ADD, entry),
|
|
610
|
+
update: (id, updates) => electron.ipcRenderer.invoke(Channels.VAULT_UPDATE, id, updates),
|
|
611
|
+
remove: (id) => electron.ipcRenderer.invoke(Channels.VAULT_REMOVE, id),
|
|
612
|
+
auditLog: (limit) => electron.ipcRenderer.invoke(Channels.VAULT_AUDIT_LOG, limit)
|
|
613
|
+
},
|
|
614
|
+
humanVault: {
|
|
615
|
+
list: (domain) => electron.ipcRenderer.invoke(Channels.HUMAN_VAULT_LIST, domain),
|
|
616
|
+
get: (id) => electron.ipcRenderer.invoke(Channels.HUMAN_VAULT_GET, id),
|
|
617
|
+
save: (entry) => electron.ipcRenderer.invoke(Channels.HUMAN_VAULT_SAVE, entry),
|
|
618
|
+
update: (id, updates) => electron.ipcRenderer.invoke(Channels.HUMAN_VAULT_UPDATE, id, updates),
|
|
619
|
+
remove: (id) => electron.ipcRenderer.invoke(Channels.HUMAN_VAULT_REMOVE, id),
|
|
620
|
+
auditLog: (limit) => electron.ipcRenderer.invoke(Channels.HUMAN_VAULT_AUDIT_LOG, limit)
|
|
621
|
+
},
|
|
622
|
+
automation: {
|
|
623
|
+
getInstalled: () => electron.ipcRenderer.invoke(Channels.AUTOMATION_GET_INSTALLED),
|
|
624
|
+
installFromFile: () => electron.ipcRenderer.invoke(Channels.AUTOMATION_INSTALL_FROM_FILE),
|
|
625
|
+
createFromText: (source) => electron.ipcRenderer.invoke(Channels.AUTOMATION_CREATE_FROM_TEXT, source),
|
|
626
|
+
updateFromText: (id, source) => electron.ipcRenderer.invoke(Channels.AUTOMATION_UPDATE_FROM_TEXT, id, source),
|
|
627
|
+
uninstall: (id) => electron.ipcRenderer.invoke(Channels.AUTOMATION_UNINSTALL, id)
|
|
628
|
+
},
|
|
629
|
+
schedule: {
|
|
630
|
+
getAll: () => electron.ipcRenderer.invoke(Channels.SCHEDULE_GET_ALL),
|
|
631
|
+
create: (job) => electron.ipcRenderer.invoke(Channels.SCHEDULE_CREATE, job),
|
|
632
|
+
update: (id, updates) => electron.ipcRenderer.invoke(Channels.SCHEDULE_UPDATE, id, updates),
|
|
633
|
+
delete: (id) => electron.ipcRenderer.invoke(Channels.SCHEDULE_DELETE, id),
|
|
634
|
+
onJobsUpdate: (cb) => {
|
|
635
|
+
const handler = (_, updatedJobs) => cb(updatedJobs);
|
|
636
|
+
electron.ipcRenderer.on(Channels.SCHEDULE_JOBS_UPDATE, handler);
|
|
637
|
+
return () => electron.ipcRenderer.removeListener(Channels.SCHEDULE_JOBS_UPDATE, handler);
|
|
638
|
+
}
|
|
639
|
+
},
|
|
640
|
+
window: {
|
|
641
|
+
minimize: () => electron.ipcRenderer.invoke(Channels.WINDOW_MINIMIZE),
|
|
642
|
+
maximize: () => electron.ipcRenderer.invoke(Channels.WINDOW_MAXIMIZE),
|
|
643
|
+
close: () => electron.ipcRenderer.invoke(Channels.WINDOW_CLOSE)
|
|
644
|
+
},
|
|
645
|
+
autofill: {
|
|
646
|
+
list: () => electron.ipcRenderer.invoke(Channels.AUTOFILL_LIST),
|
|
647
|
+
add: (profile) => electron.ipcRenderer.invoke(Channels.AUTOFILL_ADD, profile),
|
|
648
|
+
update: (id, updates) => electron.ipcRenderer.invoke(Channels.AUTOFILL_UPDATE, id, updates),
|
|
649
|
+
delete: (id) => electron.ipcRenderer.invoke(Channels.AUTOFILL_DELETE, id),
|
|
650
|
+
fill: (profileId) => electron.ipcRenderer.invoke(Channels.AUTOFILL_FILL, profileId)
|
|
651
|
+
},
|
|
652
|
+
downloads: {
|
|
653
|
+
getAll: () => electron.ipcRenderer.invoke(Channels.DOWNLOADS_GET),
|
|
654
|
+
clear: () => electron.ipcRenderer.invoke(Channels.DOWNLOADS_CLEAR),
|
|
655
|
+
open: (id) => electron.ipcRenderer.invoke(Channels.DOWNLOADS_OPEN, id),
|
|
656
|
+
showInFolder: (id) => electron.ipcRenderer.invoke(Channels.DOWNLOADS_SHOW_IN_FOLDER, id),
|
|
657
|
+
onUpdate: (cb) => {
|
|
658
|
+
const handler = (_, items) => cb(items);
|
|
659
|
+
electron.ipcRenderer.on(Channels.DOWNLOADS_UPDATE, handler);
|
|
660
|
+
return () => electron.ipcRenderer.removeListener(Channels.DOWNLOADS_UPDATE, handler);
|
|
661
|
+
},
|
|
662
|
+
onStarted: (cb) => {
|
|
663
|
+
const handler = (_, info) => cb(info);
|
|
664
|
+
electron.ipcRenderer.on(Channels.DOWNLOAD_STARTED, handler);
|
|
665
|
+
return () => electron.ipcRenderer.removeListener(Channels.DOWNLOAD_STARTED, handler);
|
|
666
|
+
},
|
|
667
|
+
onProgress: (cb) => {
|
|
668
|
+
const handler = (_, info) => cb(info);
|
|
669
|
+
electron.ipcRenderer.on(Channels.DOWNLOAD_PROGRESS, handler);
|
|
670
|
+
return () => electron.ipcRenderer.removeListener(Channels.DOWNLOAD_PROGRESS, handler);
|
|
671
|
+
},
|
|
672
|
+
onDone: (cb) => {
|
|
673
|
+
const handler = (_, info) => cb(info);
|
|
674
|
+
electron.ipcRenderer.on(Channels.DOWNLOAD_DONE, handler);
|
|
675
|
+
return () => electron.ipcRenderer.removeListener(Channels.DOWNLOAD_DONE, handler);
|
|
676
|
+
}
|
|
677
|
+
},
|
|
678
|
+
pageDiff: {
|
|
679
|
+
onChanged: (cb) => {
|
|
680
|
+
const handler = (_, diff) => cb(diff);
|
|
681
|
+
electron.ipcRenderer.on(Channels.PAGE_CHANGED, handler);
|
|
682
|
+
return () => electron.ipcRenderer.removeListener(Channels.PAGE_CHANGED, handler);
|
|
683
|
+
},
|
|
684
|
+
get: () => electron.ipcRenderer.invoke(Channels.PAGE_DIFF_GET),
|
|
685
|
+
getHistory: () => electron.ipcRenderer.invoke(Channels.PAGE_DIFF_HISTORY)
|
|
686
|
+
},
|
|
687
|
+
security: {
|
|
688
|
+
onStateUpdate: (cb) => {
|
|
689
|
+
const handler = (_, data) => cb(data.tabId, data.state);
|
|
690
|
+
electron.ipcRenderer.on(Channels.SECURITY_STATE_UPDATE, handler);
|
|
691
|
+
return () => electron.ipcRenderer.removeListener(Channels.SECURITY_STATE_UPDATE, handler);
|
|
692
|
+
},
|
|
693
|
+
showDetails: (state) => electron.ipcRenderer.invoke(Channels.SECURITY_SHOW_DETAILS, state),
|
|
694
|
+
proceedAnyway: (tabId) => electron.ipcRenderer.invoke(Channels.SECURITY_PROCEED_ANYWAY, tabId),
|
|
695
|
+
goBackToSafety: (tabId) => electron.ipcRenderer.invoke(Channels.SECURITY_GO_BACK_TO_SAFETY, tabId)
|
|
696
|
+
},
|
|
697
|
+
updates: {
|
|
698
|
+
check: () => electron.ipcRenderer.invoke(Channels.UPDATES_CHECK),
|
|
699
|
+
openDownload: () => electron.ipcRenderer.invoke(Channels.UPDATES_OPEN_DOWNLOAD)
|
|
700
|
+
},
|
|
701
|
+
permissions: {
|
|
702
|
+
getAll: () => electron.ipcRenderer.invoke(Channels.PERMISSIONS_GET),
|
|
703
|
+
clear: () => electron.ipcRenderer.invoke(Channels.PERMISSIONS_CLEAR),
|
|
704
|
+
clearOrigin: (origin) => electron.ipcRenderer.invoke(Channels.PERMISSIONS_CLEAR_ORIGIN, origin)
|
|
705
|
+
},
|
|
706
|
+
browsingData: {
|
|
707
|
+
clear: (options) => electron.ipcRenderer.invoke(Channels.CLEAR_BROWSING_DATA, options),
|
|
708
|
+
onOpenDialog: (cb) => {
|
|
709
|
+
const handler = () => cb();
|
|
710
|
+
electron.ipcRenderer.on(Channels.CLEAR_BROWSING_DATA_OPEN, handler);
|
|
711
|
+
return () => electron.ipcRenderer.removeListener(Channels.CLEAR_BROWSING_DATA_OPEN, handler);
|
|
712
|
+
}
|
|
713
|
+
},
|
|
714
|
+
pip: {
|
|
715
|
+
toggle: () => electron.ipcRenderer.invoke(Channels.TAB_TOGGLE_PIP)
|
|
716
|
+
},
|
|
717
|
+
codex: {
|
|
718
|
+
startAuth: () => electron.ipcRenderer.invoke(Channels.CODEX_START_AUTH),
|
|
719
|
+
cancelAuth: () => electron.ipcRenderer.invoke(Channels.CODEX_CANCEL_AUTH),
|
|
720
|
+
disconnect: () => electron.ipcRenderer.invoke(Channels.CODEX_DISCONNECT),
|
|
721
|
+
onAuthStatus: (cb) => {
|
|
722
|
+
const handler = (_, payload) => cb(payload);
|
|
723
|
+
electron.ipcRenderer.on(Channels.CODEX_AUTH_STATUS, handler);
|
|
724
|
+
return () => electron.ipcRenderer.removeListener(Channels.CODEX_AUTH_STATUS, handler);
|
|
725
|
+
}
|
|
726
|
+
},
|
|
727
|
+
openrouter: {
|
|
728
|
+
startAuth: () => electron.ipcRenderer.invoke(Channels.OPENROUTER_START_AUTH),
|
|
729
|
+
cancelAuth: () => electron.ipcRenderer.invoke(Channels.OPENROUTER_CANCEL_AUTH),
|
|
730
|
+
onAuthStatus: (cb) => {
|
|
731
|
+
const handler = (_, payload) => cb(payload);
|
|
732
|
+
electron.ipcRenderer.on(Channels.OPENROUTER_AUTH_STATUS, handler);
|
|
733
|
+
return () => electron.ipcRenderer.removeListener(Channels.OPENROUTER_AUTH_STATUS, handler);
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
};
|
|
737
|
+
electron.contextBridge.exposeInMainWorld("vessel", api);
|