-
-
Notifications
You must be signed in to change notification settings - Fork 644
feat(export): add ChatGPT export #920
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
4fdb78f
365f42b
2e5fd71
357a122
c28085b
ef77656
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -74,7 +74,21 @@ afterAll(() => { | |
| describe('manifest permissions', () => { | ||
| it('keeps all-site access optional', () => { | ||
| expect(manifestChrome.host_permissions).not.toContain('<all_urls>'); | ||
| expect(manifestChrome.optional_host_permissions).toEqual(['<all_urls>']); | ||
| expect(manifestChrome.optional_host_permissions).toEqual( | ||
| expect.arrayContaining(['<all_urls>']), | ||
| ); | ||
|
Comment on lines
+77
to
+79
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win Assert the complete optional-host allowlist.
🤖 Prompt for AI Agents |
||
| }); | ||
|
|
||
| it('keeps ChatGPT host access opt-in', () => { | ||
| expect(manifestChrome.host_permissions).not.toContain('https://chatgpt.com/*'); | ||
| expect(manifestChrome.optional_host_permissions).toEqual( | ||
| expect.arrayContaining(['https://chatgpt.com/*']), | ||
| ); | ||
| expect( | ||
| manifestChrome.content_scripts.some((entry) => | ||
| entry.matches.includes('https://chatgpt.com/*'), | ||
| ), | ||
| ).toBe(false); | ||
| }); | ||
|
|
||
| it('keeps unlimitedStorage out of the shared manifest', () => { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Add
https://chat.openai.com/*to the optional ChatGPT contract.The PR objective includes both ChatGPT domains, but the manifests and regression test cover only
https://chatgpt.com/*. Add the second host to both manifests and assert both hosts in the opt-in test.manifest.json#L44-L44: addhttps://chat.openai.com/*.manifest.dev.json#L58-L58: mirror the production permission list.src/core/utils/__tests__/manifestPermissions.test.ts#L82-L91: assert both hosts and both content-script exclusions.📍 Affects 3 files
manifest.json#L44-L44(this comment)manifest.dev.json#L58-L58src/core/utils/__tests__/manifestPermissions.test.ts#L82-L91🤖 Prompt for AI Agents
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
Repository: Nagi-ovo/voyager
Length of output: 50372
🏁 Script executed:
Repository: Nagi-ovo/voyager
Length of output: 21755
🏁 Script executed:
Repository: Nagi-ovo/voyager
Length of output: 17467
🌐 Web query:
site:developer.chrome.com/docs/extensions/reference/api/tabs captureVisibleTab activeTab <all_urls> permission💡 Result:
To use the chrome.tabs.captureVisibleTab method in a Chrome extension, you must possess either the activeTab permission or the <all_urls> host permission [1]. The activeTab permission is often preferred because it grants temporary access to the current tab only in response to a direct user action (such as clicking an extension icon), and it does not trigger the broad permission warnings associated with <all_urls> [1]. Additionally, activeTab allows the capture of sensitive pages—such as chrome:-scheme pages, other extension pages, and data: URLs—which cannot be captured using only <all_urls> [1]. If your extension requires the ability to capture tabs without a direct user interaction, <all_urls> or specific host permissions are required, though these will not allow access to the aforementioned sensitive restricted pages [1]. Note that file URLs can only be captured if the user has explicitly granted the extension file access [1].
Citations:
🌐 Web query:
site:developer.chrome.com/docs/extensions/develop/concepts/activeTab activeTab user gesture content script click captureVisibleTab💡 Result:
The activeTab permission grants an extension temporary, elevated access to the currently active tab only after an explicit user gesture, such as clicking an extension action, using a context menu item, triggering a keyboard shortcut, or accepting an omnibox suggestion [1]. Regarding your specific query points: Content Scripts: Content scripts cannot directly call chrome.tabs APIs, including captureVisibleTab. Content scripts run in the context of the web page and must communicate with a background service worker or popup via messaging to trigger API calls that require extension-level privileges [1]. CaptureVisibleTab and Permissions: The chrome.tabs.captureVisibleTab API requires the <all_urls> host permission or the activeTab permission. If your extension uses activeTab, you must trigger the capture logic from your background script or popup in response to a user gesture that activates the tab permission [1]. User Gesture Requirement: While the activeTab permission itself is strictly gated by a user gesture, the captureVisibleTab API does not have an additional, separate user gesture requirement beyond the need for the extension to have valid host or activeTab permissions to perform the capture [1]. In summary, to use captureVisibleTab with activeTab, you must ensure the user has initiated an action (like a click) that grants your extension access to the active tab [1]. From there, you can execute the capture command in your background service worker or popup.
Citations:
🏁 Script executed:
Repository: Nagi-ovo/voyager
Length of output: 22999
Obtain explicit approval before retaining
<all_urls>.ensureGeneratedUiCapturePermission()requests it during Gemini generated-UI export, not ChatGPT export. Remove it if the capture flow can use narrower access; otherwise document the requirement and obtain approval in both manifests.📍 Affects 2 files
manifest.json#L44-L44(this comment)manifest.dev.json#L58-L58🤖 Prompt for AI Agents
Source: Coding guidelines