codex-overleaf-link 2.5.0 → 2.6.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/README.md +155 -392
- package/README.zh-CN.md +154 -393
- package/extension/bootstrap/background.js +52 -9
- package/extension/bootstrap/manifest.template.json +1 -1
- package/extension/bootstrap/popup.html +1 -0
- package/extension/bootstrap/popupFallback.js +55 -0
- package/extension/bootstrap/updateStatus.js +1 -0
- package/extension/src/background.js +283 -55
- package/extension/src/backgroundBootstrapMigration.js +181 -0
- package/extension/src/backgroundSharedSessions.js +129 -16
- package/extension/src/backgroundUpdateCoordinator.js +242 -29
- package/extension/src/backgroundUpdateSafety.js +173 -0
- package/extension/src/content/activeTurnControl.js +171 -8
- package/extension/src/content/applyResultFormatters.js +46 -73
- package/extension/src/content/assetTransferBroker.js +72 -14
- package/extension/src/content/composerAttachments.js +104 -47
- package/extension/src/content/composerPanel.js +110 -12
- package/extension/src/content/contentRuntime.js +1555 -926
- package/extension/src/content/contextTray.js +8 -2
- package/extension/src/content/contextUsageView.js +267 -0
- package/extension/src/content/diagnosticsController.js +122 -96
- package/extension/src/content/diagnosticsExport.js +19 -5
- package/extension/src/content/diagnosticsPanel.js +48 -0
- package/extension/src/content/directoryCleanupRecovery.js +54 -0
- package/extension/src/content/generated/content.bundle.js +11077 -3412
- package/extension/src/content/generated/content.bundle.meta.json +14 -3
- package/extension/src/content/globalPreferencesController.js +1 -1
- package/extension/src/content/legacyGlobalRegistry.js +10 -0
- package/extension/src/content/localSkillsPanel.js +104 -14
- package/extension/src/content/markdownDomRenderer.js +5 -3
- package/extension/src/content/markdownText.js +47 -11
- package/extension/src/content/modelPicker.js +8 -4
- package/extension/src/content/nativeCompatibilityController.js +74 -30
- package/extension/src/content/otWarmMirror.js +5 -6
- package/extension/src/content/otWarmMirrorController.js +17 -20
- package/extension/src/content/pageBridgeClient.js +17 -4
- package/extension/src/content/panelMaintenance.js +46 -14
- package/extension/src/content/panelRenderer.js +57 -27
- package/extension/src/content/pendingInputView.js +1 -1
- package/extension/src/content/projectProviderSelection.js +13 -4
- package/extension/src/content/projectSessionCleanup.js +109 -62
- package/extension/src/content/projectSettingsCoordinator.js +67 -6
- package/extension/src/content/providerSettingsCoordinator.js +46 -8
- package/extension/src/content/providerSettingsDialog.js +73 -14
- package/extension/src/content/recentProjects.js +15 -8
- package/extension/src/content/runActivitySummary.js +160 -18
- package/extension/src/content/runCompletionMeta.js +532 -0
- package/extension/src/content/runController.js +39 -15
- package/extension/src/content/runFailureNotice.js +29 -13
- package/extension/src/content/runGuidanceController.js +72 -27
- package/extension/src/content/runGuidanceView.js +59 -10
- package/extension/src/content/runPresence.js +18 -8
- package/extension/src/content/runQueueScheduler.js +157 -47
- package/extension/src/content/runRecoveryActions.js +147 -0
- package/extension/src/content/runResultActions.js +28 -143
- package/extension/src/content/runReviewController.js +633 -0
- package/extension/src/content/runScrollLayout.js +21 -2
- package/extension/src/content/runTimelineView.js +367 -175
- package/extension/src/content/scopedPersistencePanelState.js +134 -20
- package/extension/src/content/selectionContextView.js +1 -1
- package/extension/src/content/sensitivePreflight.js +153 -0
- package/extension/src/content/sessionForkController.js +80 -17
- package/extension/src/content/sessionManager.js +50 -4
- package/extension/src/content/sessionMenuView.js +54 -18
- package/extension/src/content/sessionPersistence.js +25 -5
- package/extension/src/content/settingsPanel.js +22 -5
- package/extension/src/content/settingsWorkbench.js +132 -89
- package/extension/src/content/sharedSessionViewSync.js +49 -11
- package/extension/src/content/subagentActivityView.js +23 -7
- package/extension/src/content/updateIdle.js +4 -1
- package/extension/src/content/updateNotice.js +118 -12
- package/extension/src/content/updateSafetyReceiver.js +58 -0
- package/extension/src/content/writebackController.js +53 -4
- package/extension/src/content/writebackOrchestrator.js +116 -94
- package/extension/src/content/writingStyleSettings.js +35 -11
- package/extension/src/page/binaryAssetUploader.js +136 -14
- package/extension/src/page/compileBridge.js +193 -180
- package/extension/src/page/fileMover.js +256 -0
- package/extension/src/page/overleafCapabilities.js +4 -1
- package/extension/src/page/ownedDirectoryCleanup.js +94 -0
- package/extension/src/page/referenceProjects.js +1 -0
- package/extension/src/page/reviewContext.js +113 -0
- package/extension/src/page/saveState.js +6 -4
- package/extension/src/page/snapshotRouter.js +84 -39
- package/extension/src/page/textCoordinates.js +17 -1
- package/extension/src/page/textFileCreator.js +114 -26
- package/extension/src/page/trackedChangeCapture.js +12 -2
- package/extension/src/page/trackedChangeOwnership.js +19 -1
- package/extension/src/page/trackedChangeReplay.js +41 -21
- package/extension/src/page/trackedChangesLifecycle.js +217 -199
- package/extension/src/page/treeOperations.js +7 -10
- package/extension/src/page/updateSafetyProbe.js +41 -0
- package/extension/src/page/writebackReceiptJournal.js +2 -0
- package/extension/src/page/writebackRouter.js +103 -155
- package/extension/src/pageBridge.js +126 -69
- package/extension/src/popup.js +62 -10
- package/extension/src/shared/agentTranscript.js +373 -17
- package/extension/src/shared/auditRecords.js +4 -0
- package/extension/src/shared/compatibility.js +22 -6
- package/extension/src/shared/compileAdapter.js +129 -66
- package/extension/src/shared/composerAttachmentDraft.js +156 -0
- package/extension/src/shared/contextUsage.js +125 -0
- package/extension/src/shared/directoryCleanupProof.js +43 -0
- package/extension/src/shared/failureReasons.js +349 -4
- package/extension/src/shared/globalPreferences.js +30 -13
- package/extension/src/shared/governanceRules.js +4 -37
- package/extension/src/shared/i18n.js +590 -24
- package/extension/src/shared/lineReferences.js +38 -31
- package/extension/src/shared/managedUpdateProjection.js +2 -2
- package/extension/src/shared/nativeRequestIdentity.js +1 -0
- package/extension/src/shared/pageRpcContract.js +5 -4
- package/extension/src/shared/panelIcons.js +39 -0
- package/extension/src/shared/projectFiles.js +21 -44
- package/extension/src/shared/providerProfiles.js +5 -3
- package/extension/src/shared/reviewing.js +130 -1
- package/extension/src/shared/runActivityModel.js +70 -4
- package/extension/src/shared/runExecutionSnapshot.js +13 -0
- package/extension/src/shared/runInputQueue.js +48 -5
- package/extension/src/shared/selectionContext.js +12 -3
- package/extension/src/shared/sessionState.js +132 -28
- package/extension/src/shared/sessionTitle.js +14 -1
- package/extension/src/shared/settlementFacts.js +10 -2
- package/extension/src/shared/sharedSessionBridge.js +118 -27
- package/extension/src/shared/sharedSessionTransfer.js +140 -0
- package/extension/src/shared/staleGuard.js +166 -52
- package/extension/src/shared/storageDb.js +90 -26
- package/extension/src/shared/storageMigration.js +78 -112
- package/extension/src/shared/storageRunActions.js +267 -30
- package/extension/src/shared/subagentActivityModel.js +1 -1
- package/extension/src/shared/undoOperations.js +253 -32
- package/extension/src/shared/updateConsent.js +6 -4
- package/extension/src/shared/updateRuntimeIdentity.js +17 -3
- package/extension/src/shared/writebackIntent.js +16 -0
- package/extension/src/shared/writebackOperationEvidence.js +4 -15
- package/extension/src/shared/writebackSettlement.js +58 -40
- package/extension/styles/panel.css +1123 -493
- package/native-host/src/anthropicBridgeRequest.js +4 -2
- package/native-host/src/anthropicBridgeResponse.js +6 -2
- package/native-host/src/anthropicMessagesBridge.js +24 -16
- package/native-host/src/bootstrapMigration.js +296 -0
- package/native-host/src/bootstrapMigrationContract.js +101 -0
- package/native-host/src/bootstrapUpdate.js +269 -0
- package/native-host/src/bootstrapUpdateWatchdog.js +44 -0
- package/native-host/src/chatBridgeRequest.js +60 -6
- package/native-host/src/chatBridgeResponse.js +20 -1
- package/native-host/src/chatCompletionsBridge.js +48 -15
- package/native-host/src/codexConfigPaths.js +106 -0
- package/native-host/src/codexHome.js +66 -73
- package/native-host/src/codexHomeScope.js +124 -0
- package/native-host/src/codexInheritedAuth.js +90 -0
- package/native-host/src/codexLocalSkills.js +301 -0
- package/native-host/src/codexPromptAssembly.js +114 -127
- package/native-host/src/codexProviderTest.js +24 -26
- package/native-host/src/codexSessionRunner.js +234 -198
- package/native-host/src/codexSessionTiming.js +18 -8
- package/native-host/src/codexSkillIsolation.js +170 -0
- package/native-host/src/codexThreadFork.js +19 -3
- package/native-host/src/index.js +19 -7
- package/native-host/src/managedInstall.js +110 -35
- package/native-host/src/managedInstallRecovery.js +140 -0
- package/native-host/src/managedRuntimeEvidence.js +57 -0
- package/native-host/src/mirrorWorkspace.js +92 -22
- package/native-host/src/nativeDoctor.js +15 -0
- package/native-host/src/nativeHelperLifecycle.js +21 -0
- package/native-host/src/nativeHostRegistration.js +33 -0
- package/native-host/src/nativeRunLifecycle.js +71 -0
- package/native-host/src/processStopBarrier.js +42 -7
- package/native-host/src/projectPathPlatform.js +30 -0
- package/native-host/src/providerContextError.js +20 -0
- package/native-host/src/providerHttp.js +80 -0
- package/native-host/src/providerProfile.js +4 -2
- package/native-host/src/providerReasoning.js +2 -7
- package/native-host/src/providerRuntime.js +1 -0
- package/native-host/src/providerStore.js +72 -14
- package/native-host/src/responsesPassthroughBridge.js +266 -52
- package/native-host/src/runtimeInstaller.js +21 -1
- package/native-host/src/selectionScope.js +36 -8
- package/native-host/src/subagentAdmission.js +26 -0
- package/native-host/src/subagentBroker.js +79 -66
- package/native-host/src/subagentTelemetry.js +19 -10
- package/native-host/src/subagentWorkspacePath.js +5 -2
- package/native-host/src/taskRunnerRuntime.js +92 -57
- package/native-host/src/textPatch.js +473 -377
- package/native-host/src/tomlStatements.js +140 -0
- package/native-host/src/updateManager.js +409 -46
- package/native-host/src/writingStyleRuntime.js +57 -29
- package/native-host/src/writingStyleStore.js +73 -0
- package/package.json +5 -8
- package/scripts/install-managed.mjs +1 -0
package/README.md
CHANGED
|
@@ -2,503 +2,266 @@
|
|
|
2
2
|
<img src="extension/assets/icons/codex-overleaf-icon.png" width="72" alt="Codex Overleaf Link">
|
|
3
3
|
<h1>Codex Overleaf Link</h1>
|
|
4
4
|
<p><strong>Empower Overleaf with Codex.</strong></p>
|
|
5
|
-
<p
|
|
5
|
+
<p>
|
|
6
|
+
<img src="https://img.shields.io/badge/version-2.6.0-blue" alt="version 2.6.0">
|
|
7
|
+
<img src="https://img.shields.io/badge/chrome-MV3-green" alt="chrome manifest v3">
|
|
8
|
+
<img src="https://img.shields.io/badge/node-%3E%3D20-brightgreen" alt="node version">
|
|
9
|
+
<a href="https://github.com/Ghqqqq/codex-overleaf-link/actions/workflows/test.yml"><img src="https://github.com/Ghqqqq/codex-overleaf-link/actions/workflows/test.yml/badge.svg" alt="tests"></a>
|
|
10
|
+
<img src="https://img.shields.io/badge/runtime%20dependencies-0-orange" alt="zero npm runtime dependencies">
|
|
11
|
+
<img src="https://img.shields.io/badge/license-MIT-blue" alt="license">
|
|
12
|
+
</p>
|
|
6
13
|
<p>English | <a href="README.zh-CN.md">简体中文</a></p>
|
|
7
|
-
<p>Chrome · macOS / Windows / Linux · Local Codex</p>
|
|
8
14
|
</div>
|
|
9
15
|
|
|
10
|
-
Ask about
|
|
16
|
+
Codex Overleaf Link adds a Codex panel next to the Overleaf editor. Ask about your project, or let Codex edit it: changes go back through the editor, as tracked changes if you want, and a run can be undone until you accept its changes. Codex runs on your machine through the Codex CLI.
|
|
11
17
|
|
|
12
|
-

|
|
13
19
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
<details>
|
|
17
|
-
<summary>Read the conversation detail (native 2x PNG)</summary>
|
|
18
|
-
|
|
19
|
-
<p align="center"><img src="assets/readme/2.5.0/conversation@2x.png" width="393" alt="Native high-resolution capture of the actual Codex conversation"></p>
|
|
20
|
-
|
|
21
|
-
</details>
|
|
20
|
+
[Features](#features) · [Install](#install) · [How it works](#how-it-works) · [Configuration](#configuration) · [Troubleshooting](#troubleshooting)
|
|
22
21
|
|
|
22
|
+
## Features
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
### Ask, Auto and Track
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
## Read, revise, and review in one workspace
|
|
29
|
-
|
|
30
|
-
| Intent | Control | Result |
|
|
26
|
+
| Mode | Codex can | Changes go to |
|
|
31
27
|
|---|---|---|
|
|
32
|
-
|
|
|
33
|
-
|
|
|
34
|
-
|
|
|
35
|
-
| Reverse a run | **Undo changes** | Eligible edits are restored and eligible newly created files are removed. |
|
|
36
|
-
|
|
37
|
-
Undo also works after refresh. If a file was edited again afterwards, that file stays available for review; completed Undo steps are retained so a retry can focus on the remaining work.
|
|
38
|
-
|
|
39
|
-
### Give the conversation the right context
|
|
40
|
-
|
|
41
|
-
Use `@` or **+** to attach project files, add `@compile-log` for a compile issue, or select text in the editor. **Add to Chat** provides context; **Edit Selection** sets the requested edit range. PDFs and images can be attached to the composer as references.
|
|
28
|
+
| **Ask** | read the project | nowhere; Overleaf is not touched |
|
|
29
|
+
| **Auto** | read and edit | Overleaf, in Editing mode |
|
|
30
|
+
| **Auto + Track** | read and edit | Overleaf, as tracked changes |
|
|
42
31
|
|
|
43
|
-
|
|
32
|
+
With Track on, each rewritten sentence becomes one tracked change and small fixes stay word-level, so the Review panel reads like edits made by hand. **Accept changes** accepts the run's own tracked changes. **Undo changes** restores the files the run wrote and removes the files it created, also after a page reload.
|
|
44
33
|
|
|
45
|
-
|
|
34
|
+

|
|
46
35
|
|
|
47
|
-
|
|
36
|
+
- Auto doesn't ask before each edit, but deleting files and adding or replacing images and PDFs always ask first.
|
|
37
|
+
- If a file is edited again after the run, Undo stops at that file instead of overwriting it.
|
|
38
|
+
- **Cancel** stops a run. Files already written stay and can still be undone.
|
|
39
|
+
- Track Changes depends on the project owner's Overleaf plan. When it isn't available, the panel asks before the run whether to write without tracking.
|
|
48
40
|
|
|
49
|
-
|
|
41
|
+
### Context
|
|
50
42
|
|
|
51
|
-
|
|
52
|
-
<tr>
|
|
53
|
-
<td width="50%" align="center"><img src="assets/readme/2.5.0/activity@2x.png" width="393" alt="The actual run timeline and two completed subagent cards"></td>
|
|
54
|
-
<td width="50%" align="center"><img src="assets/readme/2.5.0/subagent@2x.png" width="393" alt="The actual read-only Structure subagent conversation"></td>
|
|
55
|
-
</tr>
|
|
56
|
-
</table>
|
|
43
|
+
Attach project files with `@` or **+**, add `@compile-log` for a compile problem, or select lines in the editor and choose **Add to Chat** to reference them as a range such as `main.tex:22-24`. **Edit Selection** limits the edit to the selected text. PDFs and images can be attached for Codex to read; they are never added to the project. The line above the composer shows what Codex will read next: the current file, the selected files, or the whole project.
|
|
57
44
|
|
|
58
|
-
|
|
45
|
+
Up to five project files stay attached across turns. Attachments are limited to 8 per turn, 12 MiB each and 32 MiB in total.
|
|
59
46
|
|
|
60
|
-
<
|
|
47
|
+
<p align="center">
|
|
48
|
+
<img src="assets/readme/2.6.0/selection@2x.png" width="340" align="top" alt="Lines selected in the editor, with the Add to Chat and Edit Selection toolbar">
|
|
49
|
+
<img src="assets/readme/2.6.0/context@2x.png" width="340" align="top" alt="Two files and a line range attached to the composer">
|
|
50
|
+
</p>
|
|
61
51
|
|
|
62
|
-
|
|
52
|
+
### Run timeline and subagents
|
|
63
53
|
|
|
64
|
-
|
|
54
|
+
Each run keeps its steps and its answer together. Expand the timeline to see what Codex read, ran and changed. With **Parallel Subagents** on *(experimental)*, the main agent can hand work to readers and workers that run alongside it. Open one to read its conversation, then go back to the main task.
|
|
65
55
|
|
|
66
|
-
|
|
67
|
-
2.
|
|
68
|
-
|
|
56
|
+
<p align="center">
|
|
57
|
+
<img src="assets/readme/2.6.0/activity@2x.png" width="340" align="top" alt="A run timeline with two subagents">
|
|
58
|
+
<img src="assets/readme/2.6.0/subagent@2x.png" width="340" align="top" alt="A subagent's read-only conversation">
|
|
59
|
+
</p>
|
|
69
60
|
|
|
70
|
-
|
|
61
|
+
### Context window
|
|
71
62
|
|
|
72
|
-
|
|
63
|
+
The ring beside the model shows how full the conversation's context window is. Open it to see the latest input, cached input and output, or to compact the conversation; `/compact` does the same.
|
|
73
64
|
|
|
74
|
-
|
|
65
|
+
<p align="center">
|
|
66
|
+
<img src="assets/readme/2.6.0/context-window@2x.png" width="340" align="top" alt="Context window usage beside the model">
|
|
67
|
+
<img src="assets/readme/2.6.0/slash-menu@2x.png" width="340" align="top" alt="Typing / opens the command and skill menu, with /compact first">
|
|
68
|
+
</p>
|
|
75
69
|
|
|
76
|
-
|
|
70
|
+
### Results and compile check
|
|
77
71
|
|
|
78
|
-
|
|
72
|
+
Every run ends with a short result. If a run doesn't go as planned, its card names the cause, what it means for the document, and a next step: **Didn't finish**, **Partly written**, **Not written**, or **Check Overleaf** when a write couldn't be confirmed.
|
|
79
73
|
|
|
80
|
-
|
|
74
|
+
- If you or a collaborator edit a file while Codex works, Codex's patch is moved around your edit, and Undo keeps it. If both change the same text, the file is left as it is and reported as **Not written**. **Retry sync** writes only the files that are still pending.
|
|
75
|
+
- With **Auto compile** on, Overleaf recompiles after the write. Errors are read from that compile's log and listed on the card. The fix button drafts a request with `@compile-log` in the composer, for you to send.
|
|
81
76
|
|
|
82
|
-
|
|
77
|
+
<p align="center">
|
|
78
|
+
<img src="assets/readme/2.6.0/compile-card@2x.png" width="340" align="top" alt="A compile error on the run card, with a Fix 1 compile error button">
|
|
79
|
+
<img src="assets/readme/2.6.0/compile-draft@2x.png" width="340" align="top" alt="A fix request with @compile-log drafted in the composer">
|
|
80
|
+
</p>
|
|
83
81
|
|
|
84
|
-
|
|
82
|
+
### Write in My Style *(experimental)*
|
|
85
83
|
|
|
86
|
-
|
|
84
|
+
Builds a writing-style skill from Overleaf projects and PDFs you choose.
|
|
87
85
|
|
|
88
|
-
|
|
86
|
+
1. Open **Settings → This project → Writing**.
|
|
87
|
+
2. Under **Write in My Style**, pick reference projects or add text-based PDFs.
|
|
88
|
+
3. Generate the style and turn it on for the project. After you change the references, **Update style** refreshes it.
|
|
89
89
|
|
|
90
|
-
|
|
90
|
+
The style guides phrasing, rhythm, structure and tone; facts, results and citations still come from your project. The same page holds the project's **Personalization** notes for terminology and LaTeX conventions.
|
|
91
91
|
|
|
92
|
-
|
|
93
|
-
>
|
|
94
|
-
> **Versions earlier than 2.5.0 require a manual update to 2.5.0.** The in-extension **Update now** action cannot perform this upgrade. Run the installation command below, reload the extension in `chrome://extensions`, then refresh the Overleaf page.
|
|
92
|
+
<p align="center"><img src="assets/readme/2.6.0/writing-style@2x.png" width="700" alt="The Writing page in Settings"></p>
|
|
95
93
|
|
|
96
|
-
|
|
94
|
+
### Models and providers
|
|
97
95
|
|
|
98
|
-
|
|
99
|
-
npm exec --yes codex-overleaf-link@2.5.0 -- install-managed
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
1. Run the managed installer. It prints the extension directory.
|
|
103
|
-
2. In `chrome://extensions`, enable **Developer mode**, choose **Load unpacked**, and select that directory.
|
|
104
|
-
3. Open an Overleaf project and start with **Ask**. Switch to **Auto** when a file change is intended.
|
|
105
|
-
|
|
106
|
-
The extension supports project pages on `overleaf.com`, `www.overleaf.com`, and `cn.overleaf.com`.
|
|
107
|
-
|
|
108
|
-
<a id="reference"></a>
|
|
109
|
-
|
|
110
|
-
## Setup and reference
|
|
111
|
-
|
|
112
|
-
Detailed installation, upgrade, privacy, troubleshooting, and development instructions are available below.
|
|
113
|
-
|
|
114
|
-
<details>
|
|
115
|
-
<summary><strong>Open the detailed reference</strong></summary>
|
|
96
|
+
The panel uses the local Codex CLI's models by default; choose the model and reasoning level in the composer. To use another endpoint *(experimental)*, add a provider under **Settings → All projects → Models & connections**. Shortcuts fill in the defaults for OpenAI-compatible and Anthropic-compatible APIs, Kimi, GLM and DeepSeek; you add the API key and model IDs.
|
|
116
97
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
| | |
|
|
120
|
-
|---|---|
|
|
121
|
-
| Computer | macOS, Windows, or Linux |
|
|
122
|
-
| Browser | Google Chrome. Linux Chromium also works; see [Browser support](#browser-support). |
|
|
123
|
-
| Node.js 20+ and Git | Used by the installers and the local bridge |
|
|
124
|
-
| [Codex CLI](https://github.com/openai/codex) | Installed and signed in. Check with `codex --version`. |
|
|
125
|
-
| Overleaf | An account on `overleaf.com` or `cn.overleaf.com` |
|
|
126
|
-
| TeX *(optional)* | Only for local `latexmk` checks |
|
|
98
|
+
<p align="center"><img src="assets/readme/2.6.0/providers@2x.png" width="700" alt="Provider shortcuts in Models & connections"></p>
|
|
127
99
|
|
|
128
100
|
## Install
|
|
129
101
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
Chrome does not let scripts load an extension for you, so every route ends with one short manual step in `chrome://extensions`.
|
|
102
|
+
You need Google Chrome on macOS, Windows or Linux (or Chromium on Linux), Node.js 20+, and the [Codex CLI](https://github.com/openai/codex), installed and signed in. The extension works on `overleaf.com`, `www.overleaf.com` and `cn.overleaf.com`; self-hosted Overleaf is not supported.
|
|
133
103
|
|
|
134
|
-
###
|
|
104
|
+
### Let Codex install it (recommended)
|
|
135
105
|
|
|
136
106
|
If you already use Codex in a terminal on the computer where Chrome runs, give it this prompt:
|
|
137
107
|
|
|
138
108
|
```text
|
|
139
|
-
Install Codex Overleaf Link
|
|
140
|
-
|
|
141
|
-
Read the official README and installation scripts first. Detect the operating system and check Node.js >= 20, Codex CLI, and any other prerequisites required by the selected installation method.
|
|
142
|
-
Use the latest published stable GitHub release, excluding drafts and prereleases, unless a specific version was requested. Use the documented managed installation method and install matching Extension and Native Host versions; do not substitute an unreleased main checkout.
|
|
143
|
-
Reuse the existing Chrome profile and managed installation when available. Preserve project files, session history, settings, and provider credentials. Do not print secrets or remove an existing installation without approval.
|
|
144
|
-
Complete the terminal-side setup and checks. If Chrome requires a manual Load unpacked or Reload action, provide the exact managed extension folder and the remaining steps; do not bypass browser restrictions.
|
|
145
|
-
Report the chosen release, installed Extension and Native Host versions, the browser-loaded version when observable, and the native connection check. Matching on-disk versions alone do not prove Chrome has loaded the update. Clearly identify anything still requiring manual action.
|
|
146
|
-
```
|
|
147
|
-
|
|
148
|
-
### Option B: One-line installer
|
|
149
|
-
|
|
150
|
-
macOS / Linux:
|
|
151
|
-
|
|
152
|
-
```bash
|
|
153
|
-
CODEX_OVERLEAF_REF=v2.5.0 bash -c "$(curl -fsSL https://raw.githubusercontent.com/Ghqqqq/codex-overleaf-link/v2.5.0/install.sh)"
|
|
109
|
+
Install Codex Overleaf Link on this computer. Follow the install steps in https://github.com/Ghqqqq/codex-overleaf-link, then tell me what I still need to do in Chrome.
|
|
154
110
|
```
|
|
155
111
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
```powershell
|
|
159
|
-
iwr https://raw.githubusercontent.com/Ghqqqq/codex-overleaf-link/v2.5.0/install.ps1 -OutFile install.ps1
|
|
160
|
-
$env:CODEX_OVERLEAF_REF='v2.5.0'
|
|
161
|
-
powershell -ExecutionPolicy Bypass -File install.ps1
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
The script checks the prerequisites, builds the extension, installs the native host, and prints the folder Chrome should load. On macOS it also copies that path and opens Chrome's extensions page. On macOS and Linux it leaves a `~/Codex Overleaf Link Extension` shortcut in your home folder.
|
|
165
|
-
|
|
166
|
-
### Option C: npm
|
|
112
|
+
### Install with npm
|
|
167
113
|
|
|
168
114
|
```bash
|
|
169
|
-
npm exec --yes codex-overleaf-link@2.
|
|
115
|
+
npm exec --yes codex-overleaf-link@2.6.0 -- install-managed
|
|
170
116
|
```
|
|
171
117
|
|
|
172
|
-
|
|
118
|
+
The installer sets up the native host and a managed copy of the extension, then prints the extension's folder.
|
|
173
119
|
|
|
174
120
|
### Finish in Chrome
|
|
175
121
|
|
|
176
|
-
|
|
177
|
-
2. Click **Load unpacked** and choose the folder the installer printed.
|
|
178
|
-
3. Open or refresh an Overleaf project. The panel appears on the right.
|
|
179
|
-
|
|
180
|
-
If an older copy is still loaded from a different folder, remove it so Chrome doesn't show two.
|
|
181
|
-
|
|
182
|
-
The official build carries a bundled extension key, so it always gets the same stable id and you never need `--extension-id`. Custom builds are covered under [Extension ID](#extension-id).
|
|
183
|
-
|
|
184
|
-
<details>
|
|
185
|
-
<summary><strong>Manual checkout install</strong> (custom location)</summary>
|
|
186
|
-
|
|
187
|
-
```bash
|
|
188
|
-
git clone https://github.com/Ghqqqq/codex-overleaf-link.git
|
|
189
|
-
cd codex-overleaf-link
|
|
190
|
-
npm ci
|
|
191
|
-
npm run build:content
|
|
192
|
-
npm run install:native
|
|
193
|
-
```
|
|
194
|
-
|
|
195
|
-
Then load `extension/` as an unpacked extension in Chrome. This install is unmanaged: rebuild and reload the extension after changes, and rerun `npm run install:native` after changing the native runtime. If Chrome assigns a different extension id, rerun `npm run install:native -- --extension-id <chrome-extension-id>`.
|
|
196
|
-
|
|
197
|
-
</details>
|
|
198
|
-
|
|
199
|
-
## Your first run
|
|
200
|
-
|
|
201
|
-
1. Open a project and click the Codex edge tab if the panel is hidden. The header turns green once the native host is connected.
|
|
202
|
-
2. Leave the mode on **Ask** and try something that reads the project: *"Summarise what each chapter argues, in one sentence each."*
|
|
203
|
-
3. When you want edits, switch to **Auto**, describe the change, and send. Codex edits its local copy, then the extension writes the changes into Overleaf and recompiles if **Compile** is on.
|
|
204
|
-
4. Check the result under the answer. The summary line says what was written and whether it can be undone; the file rows show the actual changes.
|
|
205
|
-
|
|
206
|
-
The run header tells you what is happening at each moment: reading the project, starting Codex, waiting for the model's first reply, then thinking and editing. If something needs your attention, such as a skipped file or a save Overleaf hasn't confirmed yet, the details open by themselves.
|
|
207
|
-
|
|
208
|
-
## Ask, Auto and Track
|
|
209
|
-
|
|
210
|
-
| | What Codex may do | Where the changes go |
|
|
211
|
-
|---|---|---|
|
|
212
|
-
| **Ask** | Read and analyse | Nowhere. Overleaf is not touched. |
|
|
213
|
-
| **Auto** | Read and edit | Written straight into Overleaf in Editing mode. |
|
|
214
|
-
| **Auto + Track** | Read and edit | Written as tracked changes you can review in Overleaf's Review panel. |
|
|
215
|
-
|
|
216
|
-
Auto does not stop for per-hunk approval, but deleting files and creating or replacing images and PDFs always ask first. Before each write the extension checks that the text it is about to change still matches what Codex saw. If a collaborator edited the same lines in the meantime, that file is skipped and reported, never overwritten.
|
|
217
|
-
|
|
218
|
-
**Undo changes** puts the run's files back the way they were, created files included, and works after a page reload. If someone edited the same text afterwards, Undo stops for that file instead of guessing.
|
|
219
|
-
|
|
220
|
-
**Accept changes** finalises a Track run's changes in one step and leaves Overleaf in Editing mode.
|
|
221
|
-
|
|
222
|
-
> [!WARNING]
|
|
223
|
-
> Don't use the run card's **Accept changes** when the same files contain unrelated tracked changes from collaborators or other runs. Accept those individually in Overleaf's Review panel instead.
|
|
224
|
-
|
|
225
|
-
**Cancel** stops the run. Anything already written stays, and the card shows which parts landed so you can undo them.
|
|
226
|
-
|
|
227
|
-
## Models and API providers
|
|
228
|
-
|
|
229
|
-
By default the panel uses your local Codex CLI: its login, models and settings. Pick a model and reasoning level from the control in the composer.
|
|
230
|
-
|
|
231
|
-
To use another endpoint, open **Project Settings → Model providers → Configure → Add provider**:
|
|
232
|
-
|
|
233
|
-
1. Enter a **Provider name**, the **Base URL** and your **API key**. HTTPS is required except for localhost.
|
|
234
|
-
2. Under **Models**, add each model with the exact ID your endpoint accepts, and mark one as the default.
|
|
235
|
-
3. Leave **API protocol** on Auto, or pick Responses API, Chat Completions or Anthropic Messages. If the URL already ends with the full endpoint path, tick **Base URL is the full protocol endpoint**.
|
|
236
|
-
4. **Test connection** sends one real request to a model you pick. Then choose **Save and use for this project**.
|
|
237
|
-
|
|
238
|
-
The choice applies to every session in the current project; other projects keep their own. Switching keeps your history and starts fresh threads for new turns. Gateways differ in how they handle tools and reasoning, so a passing test doesn't guarantee every model behaves the same in long tasks. API keys stay with the native host on your machine; task context is sent to the endpoint you chose.
|
|
239
|
-
|
|
240
|
-
## Context and attachments
|
|
241
|
-
|
|
242
|
-
- **Files**: type `@` or use the **+** tray to add up to five files. They stay selected across turns until you clear them. Codex can still read the rest of the project.
|
|
243
|
-
- **Selections**: select text in the editor and attach it as context, or as **Selection only** to restrict the edit to that range. The chip stays visible on the message you sent.
|
|
244
|
-
- **Compile log**: `@compile-log` attaches the current errors and warnings.
|
|
245
|
-
- **Attachments**: paste or drop PDFs and images into the composer. Up to 8 per turn, 12 MiB each and 32 MiB in total. They are only for Codex to read and are never written to Overleaf.
|
|
246
|
-
- **Generated files**: images, PDFs and other assets Codex creates (up to 10 MiB each) ask for confirmation before they're added to the project. LaTeX build output is filtered out.
|
|
247
|
-
|
|
248
|
-
## Updating
|
|
249
|
-
|
|
250
|
-
Managed installs check GitHub for new signed stable releases on their own. When one is available, choose **Update now** in the notice or under **Settings → Software updates**. The update waits until every Overleaf tab is saved and no task is running, replaces the extension and native host together, and restores the previous version if the new one fails its health check. Drafts and prereleases are never picked up, and an update never adds Chrome permissions silently.
|
|
251
|
-
|
|
252
|
-
The updater respects HTTP(S) proxy environment variables and the macOS/Windows system proxy. SOCKS-only or PAC-only setups need an HTTP proxy endpoint.
|
|
253
|
-
|
|
254
|
-
### Coming from v2.4.x or earlier
|
|
255
|
-
|
|
256
|
-
v2.5.0 adds `cn.overleaf.com` support, which needs a new Chrome permission, so it moves the install to Bootstrap protocol 3. Older updaters refuse that step by design rather than granting permissions themselves. **Update now will not work for this one release.** Run the installer once:
|
|
257
|
-
|
|
258
|
-
```bash
|
|
259
|
-
npm exec --yes codex-overleaf-link@2.5.0 -- install-managed
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
Then click **Reload** on the extension in `chrome://extensions` and refresh Overleaf. Your sessions, settings, provider keys and project mirrors are kept. Later releases update in place again.
|
|
122
|
+
In `chrome://extensions`, turn on **Developer mode**, click **Load unpacked** and pick the extension folder. Open an Overleaf project and the panel appears on the right.
|
|
263
123
|
|
|
264
|
-
From v2.5.0 on, a release that ever needs another reinstall is announced in the panel as **Reinstall needed for this update**, with the reason, the exact command for that version, and a copy button, instead of a failed update. New Overleaf sites no longer need a reinstall at all: the extension popup asks you to allow the site, and Chrome confirms it.
|
|
265
|
-
|
|
266
|
-
Checkout and Release-zip installs are unmanaged and always update by hand.
|
|
267
|
-
|
|
268
|
-
## Commands
|
|
269
|
-
|
|
270
|
-
| Action | Command |
|
|
271
|
-
|---|---|
|
|
272
|
-
| Install, repair or migrate | `npm exec --yes codex-overleaf-link@2.5.0 -- install-managed` |
|
|
273
|
-
| Diagnose | `npm exec --yes codex-overleaf-link@2.5.0 -- doctor` |
|
|
274
|
-
| Uninstall | `npm exec --yes codex-overleaf-link@2.5.0 -- uninstall-managed` |
|
|
275
|
-
|
|
276
|
-
npm installs, updates, and uninstalls the coordinated managed extension/native pair. The legacy `install-native` command remains available only for explicitly unmanaged extension directories:
|
|
277
|
-
|
|
278
|
-
```bash
|
|
279
|
-
npm exec --yes codex-overleaf-link@2.5.0 -- install-native
|
|
280
|
-
```
|
|
281
|
-
|
|
282
|
-
Use `--extension-id <chrome-extension-id>` only for a custom/dev unpacked extension id that differs from the official bundled id. On Linux Chromium, add `--browser chromium` to any of these.
|
|
283
|
-
|
|
284
|
-
<a id="uninstall"></a>
|
|
285
124
|
<details>
|
|
286
|
-
<summary
|
|
287
|
-
|
|
288
|
-
```bash
|
|
289
|
-
npm exec --yes codex-overleaf-link@2.5.0 -- uninstall-managed
|
|
290
|
-
```
|
|
291
|
-
|
|
292
|
-
This works in PowerShell too, and also removes installs made by `install.sh` / `install.ps1`. For an unmanaged checkout or native-only install, run `npm run uninstall:native` from the checkout, or:
|
|
293
|
-
|
|
294
|
-
```bash
|
|
295
|
-
npm exec --yes codex-overleaf-link@2.5.0 -- uninstall-native
|
|
296
|
-
```
|
|
297
|
-
|
|
298
|
-
An older native-only source install can also be removed with its bundled uninstaller:
|
|
125
|
+
<summary>Other ways to install</summary>
|
|
299
126
|
|
|
300
127
|
```bash
|
|
301
|
-
|
|
128
|
+
# macOS / Linux
|
|
129
|
+
CODEX_OVERLEAF_REF=v2.6.0 bash -c "$(curl -fsSL https://raw.githubusercontent.com/Ghqqqq/codex-overleaf-link/v2.6.0/install.sh)"
|
|
302
130
|
```
|
|
303
131
|
|
|
304
132
|
```powershell
|
|
305
|
-
|
|
133
|
+
# Windows
|
|
134
|
+
iwr https://raw.githubusercontent.com/Ghqqqq/codex-overleaf-link/v2.6.0/install.ps1 -OutFile install.ps1
|
|
135
|
+
$env:CODEX_OVERLEAF_REF='v2.6.0'
|
|
136
|
+
powershell -ExecutionPolicy Bypass -File install.ps1
|
|
306
137
|
```
|
|
307
138
|
|
|
308
|
-
Uninstalling removes the native host registration, bridge, managed extension and runtimes. It leaves your history, settings, project mirrors, provider keys and skills alone. Remove the extension from `chrome://extensions` as well. On Windows the install lives under `%LOCALAPPDATA%\CodexOverleaf` and your data under `%USERPROFILE%\.codex-overleaf`, so a full cleanup covers both. See [Local data and cleanup](#local-data-and-cleanup).
|
|
309
|
-
|
|
310
|
-
</details>
|
|
311
|
-
|
|
312
|
-
## FAQ and troubleshooting
|
|
313
|
-
|
|
314
|
-
**The panel says "Native host update required", or can't find the native host.**
|
|
315
|
-
Rerun the installer, reload the extension in `chrome://extensions`, then refresh Overleaf:
|
|
316
|
-
|
|
317
139
|
```bash
|
|
318
|
-
|
|
140
|
+
# From source. Unmanaged: rebuild and reload the extension yourself after changes.
|
|
141
|
+
git clone https://github.com/Ghqqqq/codex-overleaf-link.git && cd codex-overleaf-link
|
|
142
|
+
npm ci && npm run build:content && npm run install:native
|
|
143
|
+
# then load extension/ as an unpacked extension
|
|
319
144
|
```
|
|
320
145
|
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
**Codex CLI not found.**
|
|
324
|
-
Make sure `codex --version` works in a new terminal (on Windows, `Get-Command codex`), and that you're signed in for the built-in provider. Then rerun the installer so the launcher picks up your PATH.
|
|
325
|
-
|
|
326
|
-
**Extension id mismatch.**
|
|
327
|
-
Copy the id from `chrome://extensions` and reinstall with it. See [Extension ID](#extension-id).
|
|
328
|
-
|
|
329
|
-
**A file was skipped.**
|
|
330
|
-
Usually a collaborator changed those lines, the file couldn't be opened in the editor in time, or a project rule marks it read-only. The details under the answer say which, and **Retry sync** writes only the files that are still pending. Don't rerun the whole task just to retry. That can apply the same edit twice.
|
|
146
|
+
The official build always has the extension ID `illdpneeeopfffmiepaejglgmhpmdhdc`. If a custom build gets a different ID, pass `--extension-id <id>` to the installer. For Chromium on Linux, add `--browser chromium`.
|
|
331
147
|
|
|
332
|
-
|
|
333
|
-
Both depend on what the run actually wrote. If files were written but the button is gone, check the changes in Overleaf before doing anything else, and attach exported diagnostics to an issue.
|
|
334
|
-
|
|
335
|
-
**A write was blocked by a project rule, or the sensitive-content check fired.**
|
|
336
|
-
Rules can make paths read-only or restrict where Codex may write. Adjust them in Project Settings or narrow the request. The sensitive-content check looks for things like tokens and keys before context leaves your machine; remove or redact what it found.
|
|
337
|
-
|
|
338
|
-
**A queued message or a fork won't run.**
|
|
339
|
-
Queued messages keep the settings they were sent with. If that provider profile was changed or deleted, send the message again. A fork needs a recorded Codex turn and is disabled when there isn't one.
|
|
340
|
-
|
|
341
|
-
**Reporting a bug.**
|
|
342
|
-
Use **Export Diagnostics** in the panel. The bundle leaves out project text, prompts, compile logs, diffs and secrets by default. If you attach other logs, check them for file names, tokens and document text first.
|
|
148
|
+
</details>
|
|
343
149
|
|
|
344
150
|
## How it works
|
|
345
151
|
|
|
346
152
|
```mermaid
|
|
347
153
|
flowchart TD
|
|
348
154
|
O[Overleaf project and editor] <--> P[Page bridge]
|
|
349
|
-
P <--> C[
|
|
155
|
+
P <--> C[Panel and content runtime]
|
|
350
156
|
C <--> B[Extension service worker]
|
|
351
|
-
B <-->|Native Messaging over stdio| N[
|
|
157
|
+
B <-->|Native Messaging over stdio| N[Native host, Node]
|
|
352
158
|
N <--> M[Project mirror and baseline]
|
|
353
|
-
N <-->|JSON
|
|
354
|
-
A -->|
|
|
159
|
+
N <-->|JSON-RPC over stdio| A[codex app-server]
|
|
160
|
+
A -->|reads and edits| M
|
|
355
161
|
```
|
|
356
162
|
|
|
357
|
-
1. When you send a task, the extension
|
|
358
|
-
2. The native host starts `codex app-server`
|
|
359
|
-
3. When Codex
|
|
360
|
-
4. In Auto, the extension writes each patch through the Overleaf editor
|
|
361
|
-
5.
|
|
163
|
+
1. When you send a task, the extension saves the run's settings and syncs the project into a local mirror, or reuses the mirror if it is still current.
|
|
164
|
+
2. The native host starts `codex app-server` on the mirror, with a Codex home of its own.
|
|
165
|
+
3. When Codex is done, the host compares the mirror with its baseline and turns the differences into text patches and file transfers. An Ask run ends here.
|
|
166
|
+
4. In Auto, the extension writes each patch through the Overleaf editor. Before writing it checks the project, path rules, edit mode and expected text, and shifts the patch past edits made elsewhere in the file since the run started.
|
|
167
|
+
5. It then records the undo point, confirms the save, refreshes the mirror and, if Auto compile is on, recompiles.
|
|
362
168
|
|
|
363
|
-
|
|
169
|
+
Contributor notes on the architecture are in [docs/architecture](docs/architecture/README.md).
|
|
364
170
|
|
|
365
|
-
|
|
366
|
-
npm ci
|
|
367
|
-
npm run build:content
|
|
368
|
-
npm test
|
|
369
|
-
npm run verify:source
|
|
370
|
-
npm run verify:npm-package
|
|
371
|
-
npm run verify:update-boundary
|
|
372
|
-
npm run check:architecture
|
|
373
|
-
npm run benchmark:large
|
|
374
|
-
```
|
|
171
|
+
## Configuration
|
|
375
172
|
|
|
376
|
-
|
|
173
|
+
**Providers.** In **Settings → All projects → Models & connections → Add provider**, enter the base URL (HTTPS, except for localhost), the API key and the model IDs your endpoint accepts, and pick the protocol: Auto, Responses, Chat Completions or Anthropic Messages. **Test connection** sends one real request. The choice applies to the current project; other projects keep theirs. Keys are stored by the native host, and task context goes to the endpoint you chose.
|
|
377
174
|
|
|
378
|
-
The
|
|
175
|
+
**Skills.** The plugin's Codex home copies your Codex login and config, but not `~/.codex/AGENTS.md`, `personality`, `rules` or `memories`. **Load local Codex skills** adds `~/.codex/skills` and your local plugins; **Load Codex Overleaf skills** adds `~/.codex-overleaf/skills`. Both are on by default.
|
|
379
176
|
|
|
380
|
-
|
|
381
|
-
|---|---|
|
|
382
|
-
| Panel and task orchestration | `extension/src/content/contentRuntime.js`, `extension/src/content/runController.js` |
|
|
383
|
-
| Page snapshot and writeback | `extension/src/pageBridge.js`, `extension/src/page/snapshotRouter.js`, `extension/src/page/writebackRouter.js` |
|
|
384
|
-
| Browser/native transport | `extension/src/background.js`, `native-host/src/index.js` |
|
|
385
|
-
| Codex and local mirror | `native-host/src/taskRunnerRuntime.js`, `native-host/src/codexSessionRunner.js`, `native-host/src/mirrorWorkspace.js` |
|
|
386
|
-
| Shared contracts and persistence | `extension/src/shared/`, `extension/src/content/scopedPersistenceCoordinator.js` |
|
|
387
|
-
| Managed updates and packaging | `extension/bootstrap/`, `extension/src/backgroundUpdateCoordinator.js`, `native-host/src/updateManager.js`, `scripts/` |
|
|
388
|
-
|
|
389
|
-
Browser smoke test against a real project:
|
|
390
|
-
|
|
391
|
-
```bash
|
|
392
|
-
npm run smoke:extension -- --url 'https://www.overleaf.com/project/<project-id>' --probe panel,native,project,diagnostics --json .local/smoke.json
|
|
393
|
-
```
|
|
177
|
+
**Data.** There is no hosted backend and no telemetry. Task context goes to Codex or to the provider you configured, after a check for tokens and keys. Path rules decide what Codex may write; they don't hide files from it.
|
|
394
178
|
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
## Browser support
|
|
179
|
+
<details>
|
|
180
|
+
<summary>Where things are stored</summary>
|
|
398
181
|
|
|
399
|
-
|
|
|
182
|
+
| What | macOS / Linux | Windows |
|
|
400
183
|
|---|---|---|
|
|
401
|
-
|
|
|
402
|
-
|
|
|
403
|
-
|
|
|
404
|
-
|
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
184
|
+
| Sessions and history | IndexedDB `codex-overleaf` on the Overleaf site | same |
|
|
185
|
+
| Preferences | the extension's `chrome.storage.local` | same |
|
|
186
|
+
| Managed extension and native host | `~/.codex-overleaf/managed/` | `%LOCALAPPDATA%\CodexOverleaf\managed\` |
|
|
187
|
+
| Installer checkout | `~/.codex-overleaf/source` | `%LOCALAPPDATA%\CodexOverleaf\source` |
|
|
188
|
+
| Project mirrors | `~/.codex-overleaf/projects` | `%USERPROFILE%\.codex-overleaf\projects` |
|
|
189
|
+
| Plugin Codex home | `~/.codex-overleaf/codex-home` | `%USERPROFILE%\.codex-overleaf\codex-home` |
|
|
190
|
+
| Skills | `~/.codex-overleaf/skills` | `%USERPROFILE%\.codex-overleaf\skills` |
|
|
191
|
+
| Providers and keys | `~/.codex-overleaf/providers.json`, `provider-secrets.json` | `%USERPROFILE%\.codex-overleaf\` |
|
|
192
|
+
| Logs | `~/.codex-overleaf/native-host.log` | `%LOCALAPPDATA%\CodexOverleaf\native-host.log` |
|
|
193
|
+
| Native Messaging manifest | Chrome: `~/Library/Application Support/Google/Chrome/NativeMessagingHosts/com.codex.overleaf.json` (macOS), `~/.config/google-chrome/NativeMessagingHosts/` (Linux); Chromium: `~/.config/chromium/NativeMessagingHosts/` | `HKCU\Software\Google\Chrome\NativeMessagingHosts\com.codex.overleaf` |
|
|
194
|
+
|
|
195
|
+
The history database belongs to the Overleaf site, so removing the extension doesn't delete it.
|
|
409
196
|
|
|
410
|
-
|
|
411
|
-
CODEX_OVERLEAF_REF=v2.5.0 bash -c "$(curl -fsSL https://raw.githubusercontent.com/Ghqqqq/codex-overleaf-link/v2.5.0/install.sh)" -- --browser chromium
|
|
412
|
-
npm exec --yes codex-overleaf-link@2.5.0 -- uninstall-managed --browser chromium
|
|
413
|
-
```
|
|
414
|
-
|
|
415
|
-
## Extension ID
|
|
416
|
-
|
|
417
|
-
The repo ships a fixed extension key, so the official build always gets this id:
|
|
418
|
-
|
|
419
|
-
```
|
|
420
|
-
illdpneeeopfffmiepaejglgmhpmdhdc
|
|
421
|
-
```
|
|
197
|
+
</details>
|
|
422
198
|
|
|
423
|
-
|
|
199
|
+
## Updating
|
|
424
200
|
|
|
425
|
-
|
|
426
|
-
npm exec --yes codex-overleaf-link@2.5.0 -- install-managed --extension-id "<your-chrome-extension-id>"
|
|
427
|
-
```
|
|
201
|
+
Managed installs check GitHub Releases for signed stable versions. **Update now**, in the update notice or under **Settings → All projects → Software updates**, waits until Overleaf is saved and idle, replaces the extension and native host together, and rolls back if the new version fails its health check. **Restore previous version** takes you back. The updater follows HTTP(S) proxy variables and the macOS/Windows system proxy.
|
|
428
202
|
|
|
429
|
-
|
|
203
|
+
- From 2.5.1 or later, updates happen in place.
|
|
204
|
+
- From 2.5.0, update to 2.5.1 first.
|
|
205
|
+
- From anything older, rerun the installer. It moves the install to Bootstrap protocol 3, which the `cn.overleaf.com` permission needs. Then reload the extension. Sessions, settings and keys are kept.
|
|
430
206
|
|
|
431
|
-
|
|
207
|
+
Source checkouts and release-zip installs are unmanaged; update them by hand. Each GitHub release carries the extension zip, the native host runtime, the update bundle, the npm package, installers pinned to that release, and signed checksums.
|
|
432
208
|
|
|
433
|
-
|
|
209
|
+
## Commands
|
|
434
210
|
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
- `SHA256SUMS`, `release-manifest.json` and `release-manifest.sig`: checksums and the Ed25519-signed release metadata the updater verifies.
|
|
442
|
-
- `release-notes.md`.
|
|
211
|
+
| Task | Command |
|
|
212
|
+
|---|---|
|
|
213
|
+
| Install, repair or migrate | `npm exec --yes codex-overleaf-link@2.6.0 -- install-managed` |
|
|
214
|
+
| Diagnose | `npm exec --yes codex-overleaf-link@2.6.0 -- doctor` |
|
|
215
|
+
| Uninstall | `npm exec --yes codex-overleaf-link@2.6.0 -- uninstall-managed` |
|
|
216
|
+
| Native host only, for an unmanaged extension | `npm exec --yes codex-overleaf-link@2.6.0 -- install-native` / `uninstall-native` |
|
|
443
217
|
|
|
444
|
-
|
|
218
|
+
`uninstall-managed` removes the native host registration, the bridge, the managed extension and its runtimes. Your history, settings, mirrors, keys and skills stay. To remove everything, clear the history under **Settings → All projects → Local data → Clear local history…**, uninstall, remove the extension in `chrome://extensions`, and delete `~/.codex-overleaf` and the `~/Codex Overleaf Link Extension` shortcut (on Windows, `%USERPROFILE%\.codex-overleaf` and `%LOCALAPPDATA%\CodexOverleaf`).
|
|
445
219
|
|
|
446
|
-
|
|
220
|
+
<a name="faq-and-troubleshooting"></a>
|
|
447
221
|
|
|
448
|
-
|
|
449
|
-
|---|---|
|
|
450
|
-
| Sessions, runs, history | IndexedDB database `codex-overleaf` under the Overleaf site in Chrome |
|
|
451
|
-
| Preferences and project settings | `chrome.storage.local` of the extension |
|
|
452
|
-
| Managed extension | `~/.codex-overleaf/managed/extension` (`%LOCALAPPDATA%\CodexOverleaf\managed\extension`) |
|
|
453
|
-
| Managed native host | `~/.codex-overleaf/managed/native` (`%LOCALAPPDATA%\CodexOverleaf\managed\native`) |
|
|
454
|
-
| Installer checkout | `~/.codex-overleaf/source` (`%LOCALAPPDATA%\CodexOverleaf\source`) |
|
|
455
|
-
| Native bridge | `~/.codex-overleaf/codex-overleaf-bridge` (`%LOCALAPPDATA%\CodexOverleaf\codex-overleaf-bridge.cmd`) |
|
|
456
|
-
| Project mirrors | `~/.codex-overleaf/projects` (`%USERPROFILE%\.codex-overleaf\projects`) |
|
|
457
|
-
| Plugin Codex home | `~/.codex-overleaf/codex-home` (`%USERPROFILE%\.codex-overleaf\codex-home`) |
|
|
458
|
-
| Codex Overleaf skills | `~/.codex-overleaf/skills` (`%USERPROFILE%\.codex-overleaf\skills`) |
|
|
459
|
-
| Provider profiles and keys | `~/.codex-overleaf/providers.json`, `provider-secrets.json` (`%USERPROFILE%\.codex-overleaf`) |
|
|
460
|
-
| Logs | `~/.codex-overleaf/native-host.log`, `native-host-launcher.log` (`%LOCALAPPDATA%\CodexOverleaf\native-host.log`) |
|
|
222
|
+
## Troubleshooting
|
|
461
223
|
|
|
462
|
-
The
|
|
224
|
+
- **The native host is missing or needs an update.** Rerun `install-managed`, reload the extension and refresh Overleaf.
|
|
225
|
+
- **Codex CLI not found.** Make sure `codex --version` works in a new terminal, then rerun the installer so it picks up your `PATH`.
|
|
226
|
+
- **Extension ID mismatch.** Copy the ID from `chrome://extensions` and reinstall with `--extension-id <id>`.
|
|
227
|
+
- **A file was skipped.** Its target text changed during the run, the editor couldn't open it, or a path rule makes it read-only. The details under the answer say which.
|
|
228
|
+
- **A write was blocked by a path rule or the sensitive-content check.** Path rules can make files read-only; the check looks for tokens and keys before context leaves your machine. Change the rule in the project settings, or remove what the check found.
|
|
229
|
+
- **The compile result is unconfirmed.** The panel only reports a compile whose log it could read. Check the log in Overleaf.
|
|
230
|
+
- **Undo changes or Accept changes is missing.** Both depend on what the run wrote. If files were written but the button is gone, check the changes in Overleaf and attach **Export Diagnostics** to an issue.
|
|
231
|
+
- **A queued message or a fork won't run.** Queued messages keep the settings they were sent with; if that provider was changed or deleted, send the message again. Forking needs a recorded Codex turn.
|
|
232
|
+
- **Reporting a bug.** Attach **Export Diagnostics** from the panel. By default it leaves out project text, prompts, compile logs, diffs and secrets.
|
|
463
233
|
|
|
464
|
-
|
|
234
|
+
## Development
|
|
465
235
|
|
|
466
|
-
|
|
467
|
-
|
|
236
|
+
```bash
|
|
237
|
+
npm ci
|
|
238
|
+
npm test # core suite
|
|
239
|
+
npm run test:platform # installation and process contracts
|
|
240
|
+
npm run build:content # bundle the content script
|
|
241
|
+
npm run install:managed # put a local build into the managed install
|
|
242
|
+
```
|
|
468
243
|
|
|
469
|
-
|
|
244
|
+
The content script is bundled from [content-entry.mjs](extension/entries/content-entry.mjs). There are no npm runtime dependencies: development uses a pinned esbuild, and the Markdown and math libraries are vendored. `npm run bridge` runs the native host on stdio.
|
|
470
245
|
|
|
471
|
-
|
|
|
246
|
+
| Area | Entry points |
|
|
472
247
|
|---|---|
|
|
473
|
-
|
|
|
474
|
-
|
|
|
475
|
-
|
|
|
476
|
-
|
|
|
477
|
-
|
|
478
|
-
|
|
248
|
+
| Panel and runs | `extension/src/content/contentRuntime.js`, `runController.js` |
|
|
249
|
+
| Snapshots and writeback | `extension/src/pageBridge.js`, `extension/src/page/snapshotRouter.js`, `writebackRouter.js` |
|
|
250
|
+
| Transport | `extension/src/background.js`, `native-host/src/index.js` |
|
|
251
|
+
| Codex and the mirror | `native-host/src/taskRunnerRuntime.js`, `codexSessionRunner.js`, `mirrorWorkspace.js` |
|
|
252
|
+
| Patches | `native-host/src/textPatch.js` |
|
|
253
|
+
| Updates and packaging | `extension/bootstrap/`, `native-host/src/updateManager.js`, `scripts/` |
|
|
479
254
|
|
|
480
|
-
|
|
481
|
-
2. Run `uninstall-managed` (or `uninstall-native` for an unmanaged install). See [Uninstall](#uninstall).
|
|
482
|
-
3. Remove the extension in `chrome://extensions`. Chrome clears its `chrome.storage.local` with it.
|
|
483
|
-
4. Delete the local folders. **This permanently removes mirrors, plugin history, provider keys and skills.**
|
|
255
|
+
To run standalone panel, Native, project-read and diagnostics probes against a real project:
|
|
484
256
|
|
|
485
257
|
```bash
|
|
486
|
-
|
|
487
|
-
```
|
|
488
|
-
|
|
489
|
-
```powershell
|
|
490
|
-
Remove-Item -Recurse -Force "$env:LOCALAPPDATA\CodexOverleaf", "$env:USERPROFILE\.codex-overleaf" -ErrorAction SilentlyContinue
|
|
258
|
+
npm run smoke:extension -- --url 'https://www.overleaf.com/project/<id>' --probe panel,native,project,diagnostics --json .local/smoke.json
|
|
491
259
|
```
|
|
492
260
|
|
|
493
|
-
|
|
261
|
+
For local Managed installation acceptance, follow the [development SOP](docs/architecture/change-workflow.md#4-implement-and-validate-obtain-evidence-proportional-to-risk), including extension Reload, loaded build identity, Ask with zero writes, reversible two-file write/Undo, editor cleanup and refreshed history. Apply the SOP's Luna selection, model/run-ID recording, and unavailable-model blocker rules to real-model runs.
|
|
494
262
|
|
|
495
|
-
|
|
263
|
+
Pull requests are welcome. For larger changes, please open an issue first, and keep both READMEs in step.
|
|
496
264
|
|
|
497
265
|
## License
|
|
498
266
|
|
|
499
267
|
[MIT](LICENSE)
|
|
500
|
-
|
|
501
|
-
<p align="center"><strong>English</strong> | <a href="README.zh-CN.md" lang="zh-CN">简体中文</a></p>
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
</details>
|