codex-overleaf-link 2.1.4 → 2.2.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 +27 -23
- package/extension/bootstrap/background.js +14 -1
- package/extension/bootstrap/manifest.template.json +1 -1
- package/extension/runtime-manifest.json +11 -0
- package/extension/src/background.js +507 -8
- package/extension/src/backgroundUpdateCoordinator.js +284 -19
- package/extension/src/content/activeTurnControl.js +179 -0
- package/extension/src/content/composerPanel.js +19 -6
- package/extension/src/content/contentRuntime.js +335 -317
- package/extension/src/content/diagnosticsPanel.js +132 -1
- package/extension/src/content/markdownDomRenderer.js +451 -0
- package/extension/src/content/markdownText.js +86 -7
- package/extension/src/content/mathText.js +49 -4
- package/extension/src/content/modelPicker.js +14 -5
- package/extension/src/content/nativeChannel.js +7 -1
- package/extension/src/content/otWarmMirror.js +1 -1
- package/extension/src/content/panelRenderer.js +112 -12
- package/extension/src/content/pendingInputView.js +106 -0
- package/extension/src/content/projectProviderSelection.js +68 -0
- package/extension/src/content/projectSessionCleanup.js +104 -0
- package/extension/src/content/providerSettingsCoordinator.js +170 -22
- package/extension/src/content/providerSettingsDialog.js +2 -2
- package/extension/src/content/recentProjects.js +24 -13
- package/extension/src/content/runController.js +2 -2
- package/extension/src/content/runGuidanceController.js +70 -0
- package/extension/src/content/runGuidanceView.js +48 -0
- package/extension/src/content/runQueueScheduler.js +260 -0
- package/extension/src/content/runTimelineView.js +33 -80
- package/extension/src/content/sessionManager.js +2 -2
- package/extension/src/content/sessionPersistence.js +62 -0
- package/extension/src/content/settingsPanel.js +1 -1
- package/extension/src/content/updateNotice.js +80 -1
- package/extension/src/page/writebackRouter.js +3 -9
- package/extension/src/shared/compatibility.js +2 -1
- package/extension/src/shared/i18n.js +54 -0
- package/extension/src/shared/providerProfiles.js +3 -2
- package/extension/src/shared/runInputQueue.js +253 -0
- package/extension/src/shared/sessionState.js +45 -22
- package/extension/src/shared/storageDb.js +39 -44
- package/extension/src/shared/storageMigration.js +123 -3
- package/extension/src/shared/storageRunActions.js +34 -1
- package/extension/src/shared/updateConsent.js +15 -4
- package/extension/styles/panel.css +370 -23
- package/extension/vendor/katex/katex.min.css +1 -1
- package/extension/vendor/markdown-it/LICENSE +22 -0
- package/extension/vendor/markdown-it/SOURCE.json +7 -0
- package/extension/vendor/markdown-it/VERSION +1 -0
- package/extension/vendor/markdown-it/markdown-it.min.js +3 -0
- package/native-host/src/anthropicBridgeRequest.js +3 -3
- package/native-host/src/anthropicBridgeResponse.js +58 -17
- package/native-host/src/anthropicMessagesBridge.js +156 -23
- package/native-host/src/chatBridgeRequest.js +1 -1
- package/native-host/src/chatBridgeResponse.js +12 -8
- package/native-host/src/chatCompletionsBridge.js +22 -40
- package/native-host/src/codexPromptAssembly.js +3 -1
- package/native-host/src/codexProviderLaunch.js +6 -3
- package/native-host/src/codexSessionRunner.js +66 -66
- package/native-host/src/codexSessionTiming.js +45 -0
- package/native-host/src/diffEngine.js +10 -5
- package/native-host/src/index.js +58 -3
- package/native-host/src/managedInstall.js +45 -7
- package/native-host/src/providerProfile.js +2 -2
- package/native-host/src/providerStreamLifecycle.js +100 -0
- package/native-host/src/responsesPassthroughBridge.js +636 -0
- package/native-host/src/taskRunnerRuntime.js +81 -2
- package/native-host/src/updateArchive.js +4 -3
- package/native-host/src/updateManager.js +306 -19
- package/native-host/src/updateTrust.js +1 -1
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<h1>Codex Overleaf Link</h1>
|
|
4
4
|
<p><strong>Empower Overleaf with Codex.</strong></p>
|
|
5
5
|
<p>
|
|
6
|
-
<img src="https://img.shields.io/badge/version-2.
|
|
6
|
+
<img src="https://img.shields.io/badge/version-2.2.0-blue" alt="version">
|
|
7
7
|
<img src="https://img.shields.io/badge/platform-macOS%20%2F%20Windows%20%2F%20Linux-lightgrey" alt="platform">
|
|
8
8
|
<img src="https://img.shields.io/badge/chrome-MV3-green" alt="chrome manifest v3">
|
|
9
9
|
<img src="https://img.shields.io/badge/node-%3E%3D20-brightgreen" alt="node version">
|
|
@@ -38,14 +38,14 @@ One command installs the managed native host **and** managed extension runtime.
|
|
|
38
38
|
macOS / Linux:
|
|
39
39
|
|
|
40
40
|
```bash
|
|
41
|
-
CODEX_OVERLEAF_REF=v2.
|
|
41
|
+
CODEX_OVERLEAF_REF=v2.2.0 bash -c "$(curl -fsSL https://raw.githubusercontent.com/Ghqqqq/codex-overleaf-link/v2.2.0/install.sh)"
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
Windows PowerShell:
|
|
45
45
|
|
|
46
46
|
```powershell
|
|
47
|
-
iwr https://raw.githubusercontent.com/Ghqqqq/codex-overleaf-link/v2.
|
|
48
|
-
$env:CODEX_OVERLEAF_REF='v2.
|
|
47
|
+
iwr https://raw.githubusercontent.com/Ghqqqq/codex-overleaf-link/v2.2.0/install.ps1 -OutFile install.ps1
|
|
48
|
+
$env:CODEX_OVERLEAF_REF='v2.2.0'
|
|
49
49
|
powershell -ExecutionPolicy Bypass -File install.ps1
|
|
50
50
|
```
|
|
51
51
|
|
|
@@ -56,7 +56,7 @@ Then, in the `chrome://extensions` tab the script opened: enable **Developer mod
|
|
|
56
56
|
`npm exec` installs the same managed native host and extension runtime without keeping a source checkout. Use it if you prefer a pinned npm package.
|
|
57
57
|
|
|
58
58
|
```bash
|
|
59
|
-
npm exec --yes codex-overleaf-link@2.
|
|
59
|
+
npm exec --yes codex-overleaf-link@2.2.0 -- install-managed
|
|
60
60
|
```
|
|
61
61
|
|
|
62
62
|
Then, in `chrome://extensions`, enable **Developer mode**, click **Load unpacked**, and select the managed extension path printed by the command. The Release extension zip remains available for explicitly unmanaged/manual installations.
|
|
@@ -86,9 +86,9 @@ npm installs, updates, and uninstalls the coordinated managed extension/native p
|
|
|
86
86
|
|
|
87
87
|
| Action | Command |
|
|
88
88
|
|--------|---------|
|
|
89
|
-
| Install / update | `npm exec --yes codex-overleaf-link@2.
|
|
90
|
-
| Diagnose | `npm exec --yes codex-overleaf-link@2.
|
|
91
|
-
| Uninstall | `npm exec --yes codex-overleaf-link@2.
|
|
89
|
+
| Install / update | `npm exec --yes codex-overleaf-link@2.2.0 -- install-managed` |
|
|
90
|
+
| Diagnose | `npm exec --yes codex-overleaf-link@2.2.0 -- doctor` |
|
|
91
|
+
| Uninstall | `npm exec --yes codex-overleaf-link@2.2.0 -- uninstall-managed` |
|
|
92
92
|
|
|
93
93
|
Use `--extension-id <chrome-extension-id>` only for a custom/dev unpacked extension id that differs from the official bundled id.
|
|
94
94
|
|
|
@@ -98,13 +98,17 @@ Managed installations discover signed stable updates automatically and apply the
|
|
|
98
98
|
|
|
99
99
|
## GitHub Release Artifacts
|
|
100
100
|
|
|
101
|
-
|
|
101
|
+
### v2.2 managed-update baseline
|
|
102
102
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
- `
|
|
103
|
+
v2.2.0 introduces Bootstrap protocol 2. Existing v2.1.x managed installations must run the pinned `install-managed` command once, then reload the extension and Overleaf. Later protocol-2 releases use the in-product signed updater for ordinary runtime, style, vendor, and Native Host feature changes.
|
|
104
|
+
|
|
105
|
+
The v2.2.0 GitHub Release contains:
|
|
106
|
+
|
|
107
|
+
- `codex-overleaf-link-extension-v2.2.0.zip`: loadable Chrome extension package for manual unpacked installation.
|
|
108
|
+
- `codex-overleaf-native-host-v2.2.0.tar.gz`: native host runtime files used by the installer and release verification.
|
|
109
|
+
- `codex-overleaf-link-2.2.0.tgz`: npm native host CLI package for pinned install, doctor, and uninstall flows.
|
|
110
|
+
- `install.sh`: release-pinned macOS / Linux installer that defaults to `v2.2.0` when run directly from the release artifact.
|
|
111
|
+
- `install.ps1`: release-pinned Windows PowerShell installer that defaults to `v2.2.0` when run directly from the release artifact.
|
|
108
112
|
- `uninstall-native-host.mjs`: native host uninstaller that removes the Chrome Native Messaging manifest, bridge executable, and runtime copy.
|
|
109
113
|
- `nativeHostPlatform.js`, `manifest.js`, `runtimeInstaller.js`: helper files required by the loose uninstaller asset.
|
|
110
114
|
- `SHA256SUMS` and `release-manifest.json`: checksum and artifact metadata for release verification.
|
|
@@ -115,7 +119,7 @@ The v2.1.4 GitHub Release contains:
|
|
|
115
119
|
Remove the native host (use `--browser chromium` on Linux Chromium):
|
|
116
120
|
|
|
117
121
|
```bash
|
|
118
|
-
npm exec --yes codex-overleaf-link@2.
|
|
122
|
+
npm exec --yes codex-overleaf-link@2.2.0 -- uninstall-managed
|
|
119
123
|
```
|
|
120
124
|
|
|
121
125
|
The same command works on Windows PowerShell. If you installed from a manual checkout or source installer, you can also run `npm run uninstall:native` inside the repo, use `node ~/.codex-overleaf/source/scripts/uninstall-native-host.mjs` on macOS / Linux, or use `node $env:LOCALAPPDATA\CodexOverleaf\source\scripts\uninstall-native-host.mjs` on Windows PowerShell.
|
|
@@ -150,13 +154,13 @@ Then remove the extension from `chrome://extensions`. To delete local data: on m
|
|
|
150
154
|
Linux Chromium install or update:
|
|
151
155
|
|
|
152
156
|
```bash
|
|
153
|
-
CODEX_OVERLEAF_REF=v2.
|
|
157
|
+
CODEX_OVERLEAF_REF=v2.2.0 bash -c "$(curl -fsSL https://raw.githubusercontent.com/Ghqqqq/codex-overleaf-link/v2.2.0/install.sh)" -- --browser chromium
|
|
154
158
|
```
|
|
155
159
|
|
|
156
160
|
Linux Chromium uninstall:
|
|
157
161
|
|
|
158
162
|
```bash
|
|
159
|
-
npm exec --yes codex-overleaf-link@2.
|
|
163
|
+
npm exec --yes codex-overleaf-link@2.2.0 -- uninstall-managed --browser chromium
|
|
160
164
|
```
|
|
161
165
|
|
|
162
166
|
## Features
|
|
@@ -292,7 +296,7 @@ Composer attachments are turn-scoped Codex context. Limits are 8 attachments per
|
|
|
292
296
|
Re-run any [native host installer](#install), reload the extension in `chrome://extensions`, then refresh the Overleaf tab. This also fixes extension/native version mismatch and native protocol mismatch.
|
|
293
297
|
|
|
294
298
|
```bash
|
|
295
|
-
npm exec --yes codex-overleaf-link@2.
|
|
299
|
+
npm exec --yes codex-overleaf-link@2.2.0 -- install-managed
|
|
296
300
|
```
|
|
297
301
|
|
|
298
302
|
**The Windows popup or panel shows a Bash recovery command**
|
|
@@ -341,8 +345,8 @@ Use this matrix for release-candidate signoff and compatibility reports. Record
|
|
|
341
345
|
| Browser/channel/version | Google Chrome channel and version. | Google Chrome channel and version. | Google Chrome channel and version. | Chromium channel/package and version. |
|
|
342
346
|
| Install mode | Manual unpacked extension from GitHub Release zip or checkout. | Manual unpacked extension from GitHub Release zip or checkout. | Manual unpacked extension from GitHub Release zip or checkout. | Manual unpacked extension from GitHub Release zip or checkout; native host installed with `--browser chromium`. |
|
|
343
347
|
| Extension id | Bundled id `illdpneeeopfffmiepaejglgmhpmdhdc`, or actual custom id passed with `--extension-id`. | Bundled id `illdpneeeopfffmiepaejglgmhpmdhdc`, or actual custom id passed with `--extension-id`. | Bundled id `illdpneeeopfffmiepaejglgmhpmdhdc`, or actual custom id passed with `--extension-id`. | Bundled id `illdpneeeopfffmiepaejglgmhpmdhdc`, or actual custom id passed with `--extension-id`. |
|
|
344
|
-
| Installer/update command | `npm exec --yes codex-overleaf-link@2.
|
|
345
|
-
| Uninstall command | `npm exec --yes codex-overleaf-link@2.
|
|
348
|
+
| Installer/update command | `npm exec --yes codex-overleaf-link@2.2.0 -- install-managed` | `npm exec --yes codex-overleaf-link@2.2.0 -- install-managed` | `npm exec --yes codex-overleaf-link@2.2.0 -- install-managed` | `npm exec --yes codex-overleaf-link@2.2.0 -- install-managed --browser chromium` |
|
|
349
|
+
| Uninstall command | `npm exec --yes codex-overleaf-link@2.2.0 -- uninstall-managed` | `npm exec --yes codex-overleaf-link@2.2.0 -- uninstall-managed` | `npm exec --yes codex-overleaf-link@2.2.0 -- uninstall-managed` | `npm exec --yes codex-overleaf-link@2.2.0 -- uninstall-managed --browser chromium` |
|
|
346
350
|
| Manifest/registry path | `~/Library/Application Support/Google/Chrome/NativeMessagingHosts/com.codex.overleaf.json` | `HKCU\Software\Google\Chrome\NativeMessagingHosts\com.codex.overleaf` -> `%LOCALAPPDATA%\CodexOverleaf\native-host-runtime\com.codex.overleaf.json` | `~/.config/google-chrome/NativeMessagingHosts/com.codex.overleaf.json` | `~/.config/chromium/NativeMessagingHosts/com.codex.overleaf.json` |
|
|
347
351
|
| Bridge/runtime/source path | Bridge `~/.codex-overleaf/codex-overleaf-bridge`; runtime `~/.codex-overleaf/native-host-runtime`; source `~/.codex-overleaf/source`. | Bridge `%LOCALAPPDATA%\CodexOverleaf\codex-overleaf-bridge.cmd`; runtime `%LOCALAPPDATA%\CodexOverleaf\native-host-runtime`; source `%LOCALAPPDATA%\CodexOverleaf\source`. | Bridge `~/.codex-overleaf/codex-overleaf-bridge`; runtime `~/.codex-overleaf/native-host-runtime`; source `~/.codex-overleaf/source`. | Bridge `~/.codex-overleaf/codex-overleaf-bridge`; runtime `~/.codex-overleaf/native-host-runtime`; source `~/.codex-overleaf/source`. |
|
|
348
352
|
| Node/Git/Codex/TeX | Node.js >= 20; Git; Codex CLI installed and logged in; TeX optional. | Node.js >= 20; Git; Codex CLI installed and logged in; TeX optional. | Node.js >= 20; Git; Codex CLI installed and logged in; TeX optional. | Node.js >= 20; Git; Codex CLI installed and logged in; TeX optional. |
|
|
@@ -378,7 +382,7 @@ Contributions are welcome. Please open an issue before submitting large changes
|
|
|
378
382
|
The recommended v1.9 installation owns one stable unpacked-extension directory and a versioned native-host directory:
|
|
379
383
|
|
|
380
384
|
```bash
|
|
381
|
-
npm exec --yes codex-overleaf-link@2.
|
|
385
|
+
npm exec --yes codex-overleaf-link@2.2.0 -- install-managed
|
|
382
386
|
```
|
|
383
387
|
|
|
384
388
|
Load the printed extension path once from `chrome://extensions`. Starting with the next signed stable release, Codex Overleaf Link checks GitHub Releases automatically, downloads and verifies the coordinated extension/native-host bundle, waits until every connected Overleaf tab is saved and idle, and then updates both components together. A failed health check restores the previous version automatically.
|
|
@@ -388,11 +392,11 @@ The stable updater ignores drafts and prereleases, performs no telemetry, and ca
|
|
|
388
392
|
The legacy native-only installer remains available for source or unmanaged extension directories:
|
|
389
393
|
|
|
390
394
|
```bash
|
|
391
|
-
npm exec --yes codex-overleaf-link@2.
|
|
395
|
+
npm exec --yes codex-overleaf-link@2.2.0 -- install-native
|
|
392
396
|
```
|
|
393
397
|
|
|
394
398
|
Legacy native-only installations can be removed with:
|
|
395
399
|
|
|
396
400
|
```bash
|
|
397
|
-
npm exec --yes codex-overleaf-link@2.
|
|
401
|
+
npm exec --yes codex-overleaf-link@2.2.0 -- uninstall-native
|
|
398
402
|
```
|
|
@@ -352,6 +352,19 @@ async function confirmPendingUpdate(transaction) {
|
|
|
352
352
|
await rollbackBrokenRuntime(new Error('Updated native host did not report the target version.'));
|
|
353
353
|
return;
|
|
354
354
|
}
|
|
355
|
+
const native = ping.result || {};
|
|
356
|
+
const protocolRange = native.supportedProtocol || {};
|
|
357
|
+
const requiredCapabilities = globalThis.CodexOverleafCompatibility?.REQUIRED_CAPABILITIES || [];
|
|
358
|
+
const missingCapabilities = requiredCapabilities.filter(capability => native.capabilities?.[capability] !== true);
|
|
359
|
+
if (!Number.isInteger(native.protocolVersion) ||
|
|
360
|
+
!Number.isInteger(protocolRange.min) ||
|
|
361
|
+
!Number.isInteger(protocolRange.max) ||
|
|
362
|
+
native.protocolVersion < protocolRange.min ||
|
|
363
|
+
native.protocolVersion > protocolRange.max ||
|
|
364
|
+
missingCapabilities.length) {
|
|
365
|
+
await rollbackBrokenRuntime(new Error('Updated native host did not pass protocol and capability health checks.'));
|
|
366
|
+
return;
|
|
367
|
+
}
|
|
355
368
|
const confirmed = await requestInternal({
|
|
356
369
|
method: 'update.confirm',
|
|
357
370
|
params: {
|
|
@@ -377,7 +390,7 @@ async function confirmPendingUpdate(transaction) {
|
|
|
377
390
|
|
|
378
391
|
async function verifyPendingRuntimeHealth(targetVersion) {
|
|
379
392
|
const tabIds = await getPendingOverleafTabIds();
|
|
380
|
-
if (!tabIds.length) return
|
|
393
|
+
if (!tabIds.length) return false;
|
|
381
394
|
await Promise.allSettled(tabIds.map(tabId => chrome.tabs.reload(tabId)));
|
|
382
395
|
const remaining = new Set(tabIds);
|
|
383
396
|
const deadline = Date.now() + 20000;
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
"src/shared/i18n.js",
|
|
19
19
|
"src/shared/models.js",
|
|
20
20
|
"src/shared/providerProfiles.js",
|
|
21
|
+
"src/shared/runInputQueue.js",
|
|
21
22
|
"src/shared/sessionState.js",
|
|
22
23
|
"src/shared/storageKeys.js",
|
|
23
24
|
"src/shared/staleGuard.js",
|
|
@@ -43,14 +44,23 @@
|
|
|
43
44
|
"src/content/sessionPanel.js",
|
|
44
45
|
"src/content/settingsPanel.js",
|
|
45
46
|
"src/content/providerSettingsDialog.js",
|
|
47
|
+
"src/content/projectProviderSelection.js",
|
|
46
48
|
"src/content/providerSettingsCoordinator.js",
|
|
49
|
+
"src/content/sessionPersistence.js",
|
|
47
50
|
"src/content/diagnosticsPanel.js",
|
|
51
|
+
"src/content/runQueueScheduler.js",
|
|
52
|
+
"src/content/activeTurnControl.js",
|
|
53
|
+
"src/content/pendingInputView.js",
|
|
48
54
|
"src/content/composerPanel.js",
|
|
49
55
|
"src/content/themeController.js",
|
|
50
56
|
"vendor/katex/katex.min.js",
|
|
57
|
+
"vendor/markdown-it/markdown-it.min.js",
|
|
51
58
|
"src/content/mathText.js",
|
|
59
|
+
"src/content/markdownDomRenderer.js",
|
|
52
60
|
"src/content/markdownText.js",
|
|
53
61
|
"src/content/diagnosticsController.js",
|
|
62
|
+
"src/content/runGuidanceView.js",
|
|
63
|
+
"src/content/runGuidanceController.js",
|
|
54
64
|
"src/content/runTimelineView.js",
|
|
55
65
|
"src/content/projectSettingsCoordinator.js",
|
|
56
66
|
"src/content/sessionMenuView.js",
|
|
@@ -58,6 +68,7 @@
|
|
|
58
68
|
"src/content/applyResultFormatters.js",
|
|
59
69
|
"src/content/modelPickerSupport.js",
|
|
60
70
|
"src/content/modelPicker.js",
|
|
71
|
+
"src/content/projectSessionCleanup.js",
|
|
61
72
|
"src/content/recentProjects.js",
|
|
62
73
|
"src/content/otWarmMirror.js",
|
|
63
74
|
"src/content/writebackOrchestrator.js",
|