codex-overleaf-link 1.3.0 → 1.3.6
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 +62 -143
- package/extension/src/shared/compatibility.js +1 -1
- package/extension/src/shared/i18n.js +44 -20
- package/extension/src/shared/lineReferences.js +4 -6
- package/extension/src/shared/sessionState.js +31 -5
- package/extension/src/shared/storageDb.js +21 -1
- package/extension/src/shared/undoOperations.js +9 -1
- package/native-host/src/codexHome.js +83 -7
- package/native-host/src/codexSessionRunner.js +3 -0
- package/native-host/src/localSkills.js +46 -7
- package/native-host/src/skills/annotated-rewrite/SKILL.md +71 -0
- package/native-host/src/textPatch.js +669 -16
- package/package.json +1 -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-1.3.
|
|
6
|
+
<img src="https://img.shields.io/badge/version-1.3.6-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">
|
|
@@ -21,136 +21,90 @@ Overleaf is great for collaborative LaTeX writing. Codex is great for AI-assiste
|
|
|
21
21
|
|
|
22
22
|
Codex Overleaf Link bridges the two: it adds a Codex panel directly inside Overleaf, mirrors the project locally for Codex to work on, and writes accepted changes back through the browser — with stale-write guards, diff review, and undo checkpoints to reduce the risk of accidental overwrites.
|
|
23
23
|
|
|
24
|
-
## Preview
|
|
25
|
-
|
|
26
24
|
<p align="center">
|
|
27
25
|
<img src="assets/codex-preview.png" alt="Codex Overleaf Link running inside Overleaf">
|
|
28
26
|
</p>
|
|
29
27
|
|
|
30
28
|
## Install
|
|
31
29
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
1. Install or update the native host with the pinned npm package:
|
|
35
|
-
|
|
36
|
-
```bash
|
|
37
|
-
npm exec --yes codex-overleaf-link@1.3.0 -- install-native
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
2. Download `codex-overleaf-link-extension-v1.3.0.zip` from the [v1.3.0 GitHub Release](https://github.com/Ghqqqq/codex-overleaf-link/releases/tag/v1.3.0), then unzip it to a stable local folder.
|
|
30
|
+
Codex Overleaf Link has two parts: a **native host** (a local Node bridge) and the **Chrome extension**. Pick one of the two install paths below, then open Overleaf.
|
|
41
31
|
|
|
42
|
-
|
|
32
|
+
Either way, the final **Load unpacked** click is manual — Chrome does not let any installer or script load an unpacked extension for you.
|
|
43
33
|
|
|
44
|
-
|
|
34
|
+
### Option A — installer script (recommended)
|
|
45
35
|
|
|
46
|
-
|
|
36
|
+
One command installs the native host **and** sets up the extension: the script registers the native host, places the extension folder at `~/Codex Overleaf Link Extension`, copies that path to your clipboard, and opens `chrome://extensions` for you.
|
|
47
37
|
|
|
48
|
-
|
|
38
|
+
macOS / Linux:
|
|
49
39
|
|
|
50
40
|
```bash
|
|
51
|
-
CODEX_OVERLEAF_REF=v1.3.
|
|
41
|
+
CODEX_OVERLEAF_REF=v1.3.6 bash -c "$(curl -fsSL https://raw.githubusercontent.com/Ghqqqq/codex-overleaf-link/v1.3.6/install.sh)"
|
|
52
42
|
```
|
|
53
43
|
|
|
54
|
-
|
|
44
|
+
Windows PowerShell:
|
|
55
45
|
|
|
56
46
|
```powershell
|
|
57
|
-
iwr https://raw.githubusercontent.com/Ghqqqq/codex-overleaf-link/v1.3.
|
|
58
|
-
$env:CODEX_OVERLEAF_REF='v1.3.
|
|
47
|
+
iwr https://raw.githubusercontent.com/Ghqqqq/codex-overleaf-link/v1.3.6/install.ps1 -OutFile install.ps1
|
|
48
|
+
$env:CODEX_OVERLEAF_REF='v1.3.6'
|
|
59
49
|
powershell -ExecutionPolicy Bypass -File install.ps1
|
|
60
50
|
```
|
|
61
51
|
|
|
62
|
-
|
|
52
|
+
Then, in the `chrome://extensions` tab the script opened: enable **Developer mode**, click **Load unpacked**, and choose the prepared extension folder (its path is already on your clipboard). That is the only manual step.
|
|
63
53
|
|
|
64
|
-
|
|
54
|
+
### Option B — npm (native host only)
|
|
65
55
|
|
|
66
|
-
|
|
56
|
+
`npm exec` installs and updates the **native host only** — it does not include the Chrome extension. Use it if you prefer a pinned npm package to a source checkout.
|
|
67
57
|
|
|
68
58
|
```bash
|
|
69
|
-
npm exec --yes codex-overleaf-link@1.3.
|
|
59
|
+
npm exec --yes codex-overleaf-link@1.3.6 -- install-native
|
|
70
60
|
```
|
|
71
61
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
```bash
|
|
75
|
-
npm exec --yes codex-overleaf-link@1.3.0 -- doctor
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
Uninstall the native host:
|
|
79
|
-
|
|
80
|
-
```bash
|
|
81
|
-
npm exec --yes codex-overleaf-link@1.3.0 -- uninstall-native
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
Use `--extension-id <chrome-extension-id>` only for a custom/dev unpacked extension id that differs from the official bundled id.
|
|
85
|
-
|
|
86
|
-
Open any Overleaf project - the Codex panel appears on the right.
|
|
62
|
+
Then add the extension yourself: download `codex-overleaf-link-extension-v1.3.6.zip` from the [v1.3.6 GitHub Release](https://github.com/Ghqqqq/codex-overleaf-link/releases/tag/v1.3.6), unzip it to a stable folder, and in `chrome://extensions` enable **Developer mode**, click **Load unpacked**, and select that folder.
|
|
87
63
|
|
|
88
|
-
|
|
64
|
+
### Open Overleaf
|
|
89
65
|
|
|
90
|
-
|
|
91
|
-
2. In `chrome://extensions`, enable Developer mode, load or reload the unpacked extension folder, and confirm the native host is connected from the panel diagnostics.
|
|
92
|
-
3. Open an Overleaf project and start in Ask mode; switch to Suggest mode when you want Codex to propose reviewed edits, or Auto mode when the project governance and checkpoint settings are ready for direct writeback.
|
|
66
|
+
Open any Overleaf project — the Codex panel appears on the right; confirm the native host is connected from the panel diagnostics. Start in Ask mode; switch to Suggest mode for reviewed edits, or Auto mode once project governance and checkpoint settings are ready for direct writeback.
|
|
93
67
|
|
|
94
|
-
<
|
|
95
|
-
<img src="assets/codex-preview.png" alt="Codex Overleaf Link panel inside Overleaf">
|
|
96
|
-
</p>
|
|
68
|
+
The bundled extension key gives the official build a stable id, so normal installs do not need `--extension-id`. If Chrome assigns a custom build a different id, rerun the native install with `--extension-id <chrome-extension-id>` so the native manifest `allowed_origins` entry matches.
|
|
97
69
|
|
|
98
70
|
<details>
|
|
99
|
-
<summary><strong>Manual install</strong> (
|
|
71
|
+
<summary><strong>Manual checkout install</strong> (custom location)</summary>
|
|
100
72
|
|
|
101
73
|
```bash
|
|
102
74
|
git clone https://github.com/Ghqqqq/codex-overleaf-link.git
|
|
103
75
|
cd codex-overleaf-link
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
Then load `extension/` as an unpacked extension in Chrome and register the native host:
|
|
107
|
-
|
|
108
|
-
```bash
|
|
109
76
|
npm run install:native
|
|
110
77
|
```
|
|
111
78
|
|
|
112
|
-
If Chrome assigns a different extension id, rerun `npm run install:native -- --extension-id <chrome-extension-id>`.
|
|
79
|
+
Then load `extension/` as an unpacked extension in Chrome. If Chrome assigns a different extension id, rerun `npm run install:native -- --extension-id <chrome-extension-id>`.
|
|
113
80
|
|
|
114
81
|
</details>
|
|
115
82
|
|
|
116
|
-
|
|
117
|
-
<summary><strong>Update</strong></summary>
|
|
118
|
-
|
|
119
|
-
For a deterministic v1.3.0 update, run the pinned npm command. This is also the native mismatch recovery command shown by the popup and panel when they report **Native host update required**.
|
|
120
|
-
|
|
121
|
-
```bash
|
|
122
|
-
npm exec --yes codex-overleaf-link@1.3.0 -- install-native
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
If npm is unavailable, use the GitHub Release script fallback for your platform.
|
|
126
|
-
|
|
127
|
-
macOS / Linux:
|
|
83
|
+
## npm Native Host CLI
|
|
128
84
|
|
|
129
|
-
|
|
130
|
-
CODEX_OVERLEAF_REF=v1.3.0 bash -c "$(curl -fsSL https://raw.githubusercontent.com/Ghqqqq/codex-overleaf-link/v1.3.0/install.sh)"
|
|
131
|
-
```
|
|
85
|
+
npm installs, updates, uninstalls, and diagnoses the native host only. npm does not install the Chrome extension; install the Chrome extension separately from the release source checkout or extension zip.
|
|
132
86
|
|
|
133
|
-
|
|
87
|
+
| Action | Command |
|
|
88
|
+
|--------|---------|
|
|
89
|
+
| Install / update | `npm exec --yes codex-overleaf-link@1.3.6 -- install-native` |
|
|
90
|
+
| Diagnose | `npm exec --yes codex-overleaf-link@1.3.6 -- doctor` |
|
|
91
|
+
| Uninstall | `npm exec --yes codex-overleaf-link@1.3.6 -- uninstall-native` |
|
|
134
92
|
|
|
135
|
-
|
|
136
|
-
iwr https://raw.githubusercontent.com/Ghqqqq/codex-overleaf-link/v1.3.0/install.ps1 -OutFile install.ps1
|
|
137
|
-
$env:CODEX_OVERLEAF_REF='v1.3.0'
|
|
138
|
-
powershell -ExecutionPolicy Bypass -File install.ps1
|
|
139
|
-
```
|
|
93
|
+
Use `--extension-id <chrome-extension-id>` only for a custom/dev unpacked extension id that differs from the official bundled id.
|
|
140
94
|
|
|
141
|
-
|
|
95
|
+
## Update
|
|
142
96
|
|
|
143
|
-
|
|
97
|
+
To update, re-run any of the [native host installers](#install) — they install and update the same way. This is also the native mismatch recovery command shown by the popup and panel when they report **Native host update required**; it fixes extension/native version mismatch and native protocol mismatch. After updating, reload the extension in `chrome://extensions` and refresh the Overleaf page.
|
|
144
98
|
|
|
145
99
|
## GitHub Release Artifacts
|
|
146
100
|
|
|
147
|
-
The v1.3.
|
|
101
|
+
The v1.3.6 GitHub Release contains:
|
|
148
102
|
|
|
149
|
-
- `codex-overleaf-link-extension-v1.3.
|
|
150
|
-
- `codex-overleaf-native-host-v1.3.
|
|
151
|
-
- `codex-overleaf-link-1.3.
|
|
152
|
-
- `install.sh`: release-pinned macOS / Linux installer that defaults to `v1.3.
|
|
153
|
-
- `install.ps1`: release-pinned Windows PowerShell installer that defaults to `v1.3.
|
|
103
|
+
- `codex-overleaf-link-extension-v1.3.6.zip`: loadable Chrome extension package for manual unpacked installation.
|
|
104
|
+
- `codex-overleaf-native-host-v1.3.6.tar.gz`: native host runtime files used by the installer and release verification.
|
|
105
|
+
- `codex-overleaf-link-1.3.6.tgz`: npm native host CLI package for pinned install, doctor, and uninstall flows.
|
|
106
|
+
- `install.sh`: release-pinned macOS / Linux installer that defaults to `v1.3.6` when run directly from the release artifact.
|
|
107
|
+
- `install.ps1`: release-pinned Windows PowerShell installer that defaults to `v1.3.6` when run directly from the release artifact.
|
|
154
108
|
- `uninstall-native-host.mjs`: native host uninstaller that removes the Chrome Native Messaging manifest, bridge executable, and runtime copy.
|
|
155
109
|
- `nativeHostPlatform.js`, `manifest.js`, `runtimeInstaller.js`: helper files required by the loose uninstaller asset.
|
|
156
110
|
- `SHA256SUMS` and `release-manifest.json`: checksum and artifact metadata for release verification.
|
|
@@ -158,23 +112,17 @@ The v1.3.0 GitHub Release contains:
|
|
|
158
112
|
<details>
|
|
159
113
|
<summary><strong>Uninstall</strong></summary>
|
|
160
114
|
|
|
161
|
-
|
|
115
|
+
Remove the native host (use `--browser chromium` on Linux Chromium):
|
|
162
116
|
|
|
163
117
|
```bash
|
|
164
|
-
npm exec --yes codex-overleaf-link@1.3.
|
|
118
|
+
npm exec --yes codex-overleaf-link@1.3.6 -- uninstall-native
|
|
165
119
|
```
|
|
166
120
|
|
|
167
|
-
Windows PowerShell:
|
|
121
|
+
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.
|
|
168
122
|
|
|
169
|
-
|
|
170
|
-
npm exec --yes codex-overleaf-link@1.3.0 -- uninstall-native
|
|
171
|
-
```
|
|
123
|
+
The uninstaller removes the Native Messaging registration, bridge executable, and native runtime copy. It does not remove browser IndexedDB, `chrome.storage.local`, project mirrors, plugin Codex history, or project/plugin skills.
|
|
172
124
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
Remove the extension from `chrome://extensions`. Optionally delete `~/.codex-overleaf` on macOS / Linux to remove local mirrors, native runtime files, and plugin history. On Windows, `%LOCALAPPDATA%\CodexOverleaf` contains the native source, runtime, bridge, and native log, while `%USERPROFILE%\.codex-overleaf` contains project mirrors, plugin Codex home/history, and Codex Overleaf skills. Full Windows cleanup requires deleting both roots, or following [Local Data And Cleanup](#local-data-and-cleanup).
|
|
176
|
-
|
|
177
|
-
The uninstaller removes the Native Messaging registration, bridge executable, and native runtime copy. It does not remove browser IndexedDB, `chrome.storage.local`, project mirrors, plugin Codex history, or project/plugin skills. See [Local Data And Cleanup](#local-data-and-cleanup) for full deletion steps.
|
|
125
|
+
Then remove the extension from `chrome://extensions`. To delete local data: on macOS / Linux, delete `~/.codex-overleaf`. On Windows, `%LOCALAPPDATA%\CodexOverleaf` holds the native source, runtime, bridge, and native log, while `%USERPROFILE%\.codex-overleaf` holds project mirrors, plugin Codex home/history, and Codex Overleaf skills — full Windows cleanup requires deleting both roots. See [Local Data And Cleanup](#local-data-and-cleanup) for full deletion steps.
|
|
178
126
|
|
|
179
127
|
</details>
|
|
180
128
|
|
|
@@ -202,13 +150,13 @@ The uninstaller removes the Native Messaging registration, bridge executable, an
|
|
|
202
150
|
Linux Chromium install or update:
|
|
203
151
|
|
|
204
152
|
```bash
|
|
205
|
-
CODEX_OVERLEAF_REF=v1.3.
|
|
153
|
+
CODEX_OVERLEAF_REF=v1.3.6 bash -c "$(curl -fsSL https://raw.githubusercontent.com/Ghqqqq/codex-overleaf-link/v1.3.6/install.sh)" -- --browser chromium
|
|
206
154
|
```
|
|
207
155
|
|
|
208
156
|
Linux Chromium uninstall:
|
|
209
157
|
|
|
210
158
|
```bash
|
|
211
|
-
npm exec --yes codex-overleaf-link@1.3.
|
|
159
|
+
npm exec --yes codex-overleaf-link@1.3.6 -- uninstall-native --browser chromium
|
|
212
160
|
```
|
|
213
161
|
|
|
214
162
|
## Features
|
|
@@ -222,22 +170,20 @@ npm exec --yes codex-overleaf-link@1.3.0 -- uninstall-native --browser chromium
|
|
|
222
170
|
- **Auto-recompile** — triggers Overleaf recompile after writeback; logs compile errors as context.
|
|
223
171
|
- **@ context** — attach specific files, `@compile-log`, or `@current-section` to the prompt.
|
|
224
172
|
- **Composer attachments and binary writeback** — paste or drop PDFs, images, and files into the composer as turn-scoped Codex context, and review Codex-created assets before creating or replacing them in Overleaf.
|
|
225
|
-
- **Codex Overleaf skills** — install reusable plugin-scoped skills through the slash menu, then let Codex auto-trigger them or select one explicitly for the next turn.
|
|
173
|
+
- **Codex Overleaf skills** — install reusable plugin-scoped skills through the slash menu, then let Codex auto-trigger them or select one explicitly for the next turn. Each skill has its own enable toggle, honored at run time.
|
|
226
174
|
- **Governance rules** — configure project read-only and writable path rules that block unsafe writeback before browser mutation.
|
|
227
175
|
- **Sensitive preflight** — scan selected project context for likely secrets before sending it to Codex.
|
|
228
176
|
- **Audit and diagnostics** — keep local run records and export redacted diagnostic bundles for issue reports.
|
|
229
177
|
- **Model picker** — discover available Codex models locally, then switch model, reasoning effort, and speed from one compact control.
|
|
230
178
|
- **Session history** — multi-session management with rename, resume, and delete.
|
|
231
|
-
- **Isolated Codex home** — plugin sessions
|
|
232
|
-
- **Experimental OT warm mirror**
|
|
233
|
-
|
|
234
|
-
> Note: The OT warm mirror is experimental, off by default, and never writes back to Overleaf through realtime collaboration channels.
|
|
179
|
+
- **Isolated Codex home** — plugin sessions run under `~/.codex-overleaf/codex-home` (not global `~/.codex/sessions`) and do not inherit your global Codex personalization.
|
|
180
|
+
- **Experimental OT warm mirror** — optional read-only observation of active Overleaf text edits to keep focused local mirror files warm. Falls back to full snapshots when unavailable or inconsistent. Off by default; it never writes back to Overleaf through realtime collaboration channels.
|
|
235
181
|
|
|
236
182
|
## Common Workflows
|
|
237
183
|
|
|
238
|
-
- **Fix a compile error**
|
|
239
|
-
- **Rewrite a paragraph**
|
|
240
|
-
- **Translate a section**
|
|
184
|
+
- **Fix a compile error** — choose Suggest mode, attach `@compile-log`, ask Codex to diagnose and patch the failing file, review the diff, apply it, then recompile from the panel.
|
|
185
|
+
- **Rewrite a paragraph** — select the target file or `@current-section`, ask for a tone or clarity rewrite in Suggest mode, review the text diff, and accept only the hunks you want.
|
|
186
|
+
- **Translate a section** — attach the source section with `@file` or `@current-section`, specify the target language and terminology constraints, then review the proposed replacement before writeback.
|
|
241
187
|
|
|
242
188
|
## How It Works
|
|
243
189
|
|
|
@@ -278,16 +224,12 @@ This repo ships a stable Chrome extension `key`, producing the deterministic id:
|
|
|
278
224
|
illdpneeeopfffmiepaejglgmhpmdhdc
|
|
279
225
|
```
|
|
280
226
|
|
|
281
|
-
The installer uses this id by default. If Chrome assigns a different id, reinstall the native host with the actual id
|
|
282
|
-
|
|
283
|
-
macOS / Linux:
|
|
227
|
+
The installer uses this id by default. If Chrome assigns a different id, reinstall the native host with the actual id:
|
|
284
228
|
|
|
285
229
|
```bash
|
|
286
230
|
cd ~/.codex-overleaf/source && npm run install:native -- --extension-id <your-chrome-extension-id>
|
|
287
231
|
```
|
|
288
232
|
|
|
289
|
-
Windows PowerShell:
|
|
290
|
-
|
|
291
233
|
```powershell
|
|
292
234
|
cd $env:LOCALAPPDATA\CodexOverleaf\source
|
|
293
235
|
npm run install:native -- --extension-id <your-chrome-extension-id>
|
|
@@ -308,7 +250,7 @@ Codex Overleaf Link does not use a hosted backend or default telemetry. Data is
|
|
|
308
250
|
| macOS/Linux bridge | `~/.codex-overleaf/codex-overleaf-bridge` | Native Messaging launcher executable. |
|
|
309
251
|
| Windows source/runtime/bridge | `%LOCALAPPDATA%\CodexOverleaf` | `source`, `native-host-runtime`, `codex-overleaf-bridge.cmd`, and native debug log. |
|
|
310
252
|
| Project mirrors | `~/.codex-overleaf/projects` on macOS/Linux, `%USERPROFILE%\.codex-overleaf\projects` on Windows | Local mirror workspaces and mirror metadata for each Overleaf project. |
|
|
311
|
-
| Plugin Codex home | `~/.codex-overleaf/codex-home` on macOS/Linux, `%USERPROFILE%\.codex-overleaf\codex-home` on Windows | Isolated Codex home for plugin runs. It copies auth/config metadata but does not reuse global Codex sessions. |
|
|
253
|
+
| Plugin Codex home | `~/.codex-overleaf/codex-home` on macOS/Linux, `%USERPROFILE%\.codex-overleaf\codex-home` on Windows | Isolated Codex home for plugin runs. It copies auth/config metadata but does not reuse global Codex sessions or inherit global Codex personalization. |
|
|
312
254
|
| Codex Overleaf skills | `~/.codex-overleaf/skills` on macOS/Linux, `%USERPROFILE%\.codex-overleaf\skills` on Windows | Project/plugin skills managed by the extension. |
|
|
313
255
|
| Native logs | `~/.codex-overleaf/native-host.log` on macOS/Linux, `%LOCALAPPDATA%\CodexOverleaf\native-host.log` on Windows | Native debug events with content length summaries where possible. |
|
|
314
256
|
| Launcher logs | `~/.codex-overleaf/native-host-launcher.log` on macOS/Linux | POSIX launcher startup path and Node diagnostics. The Windows `.cmd` launcher does not currently emit a separate launcher log. |
|
|
@@ -318,6 +260,8 @@ Skill loading toggles default to enabled. In Project Settings:
|
|
|
318
260
|
- `Load local Codex skills` loads the user's local Codex skill environment from the global Codex home into the isolated `~/.codex-overleaf/codex-home`: `~/.codex/skills`, local Codex `plugins`, `superpowers`, and related skill/plugin configuration. Turning it off hides user/system Codex skills and local Codex plugins from Codex Overleaf runs. This affects only the plugin CODEX_HOME prepared for the run; it does not write to or reuse global `~/.codex/sessions`.
|
|
319
261
|
- `Load Codex Overleaf skills` loads project/plugin skills managed by the extension from `~/.codex-overleaf/skills` on macOS/Linux or `%USERPROFILE%\.codex-overleaf\skills` on Windows into the same isolated Codex home. Turning it off hides those extension-managed skills while preserving the stored skill files. If both toggles are off, the run starts without local Codex skills or Codex Overleaf skills.
|
|
320
262
|
|
|
263
|
+
The isolated plugin Codex home copies auth and config metadata but excludes global Codex personalization: it does not copy `~/.codex/AGENTS.md`, strips the top-level `personality` key from the copied `config.toml`, and does not link the global `rules` or `memories` directories.
|
|
264
|
+
|
|
321
265
|
Native registration paths:
|
|
322
266
|
|
|
323
267
|
| Platform/browser | Registration path |
|
|
@@ -341,31 +285,15 @@ Composer attachments are turn-scoped Codex context. Limits are 8 attachments per
|
|
|
341
285
|
|
|
342
286
|
**Native host missing or update required**
|
|
343
287
|
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
```bash
|
|
347
|
-
npm exec --yes codex-overleaf-link@1.3.0 -- install-native
|
|
348
|
-
```
|
|
349
|
-
|
|
350
|
-
If npm is unavailable, use the GitHub Release script fallback for your platform.
|
|
351
|
-
|
|
352
|
-
macOS/Linux:
|
|
288
|
+
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.
|
|
353
289
|
|
|
354
290
|
```bash
|
|
355
|
-
|
|
356
|
-
```
|
|
357
|
-
|
|
358
|
-
Windows PowerShell:
|
|
359
|
-
|
|
360
|
-
```powershell
|
|
361
|
-
iwr https://raw.githubusercontent.com/Ghqqqq/codex-overleaf-link/v1.3.0/install.ps1 -OutFile install.ps1
|
|
362
|
-
$env:CODEX_OVERLEAF_REF='v1.3.0'
|
|
363
|
-
powershell -ExecutionPolicy Bypass -File install.ps1
|
|
291
|
+
npm exec --yes codex-overleaf-link@1.3.6 -- install-native
|
|
364
292
|
```
|
|
365
293
|
|
|
366
294
|
**The Windows popup or panel shows a Bash recovery command**
|
|
367
295
|
|
|
368
|
-
Use the PowerShell recovery command
|
|
296
|
+
Use the PowerShell recovery command on Windows. The Bash command is for macOS/Linux installers.
|
|
369
297
|
|
|
370
298
|
**Codex CLI not found**
|
|
371
299
|
|
|
@@ -373,16 +301,7 @@ Confirm `codex --version` works in a new terminal and that you are logged in. On
|
|
|
373
301
|
|
|
374
302
|
**Extension id mismatch**
|
|
375
303
|
|
|
376
|
-
Copy the id shown in `chrome://extensions` and reinstall the native host with that id
|
|
377
|
-
|
|
378
|
-
```bash
|
|
379
|
-
cd ~/.codex-overleaf/source && npm run install:native -- --extension-id <your-chrome-extension-id>
|
|
380
|
-
```
|
|
381
|
-
|
|
382
|
-
```powershell
|
|
383
|
-
cd $env:LOCALAPPDATA\CodexOverleaf\source
|
|
384
|
-
npm run install:native -- --extension-id <your-chrome-extension-id>
|
|
385
|
-
```
|
|
304
|
+
Copy the id shown in `chrome://extensions` and reinstall the native host with that id (see [Extension ID](#extension-id)).
|
|
386
305
|
|
|
387
306
|
**Linux Chromium does not connect**
|
|
388
307
|
|
|
@@ -418,8 +337,8 @@ Use this matrix for release-candidate signoff and compatibility reports. Record
|
|
|
418
337
|
| Browser/channel/version | Google Chrome channel and version. | Google Chrome channel and version. | Google Chrome channel and version. | Chromium channel/package and version. |
|
|
419
338
|
| 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`. |
|
|
420
339
|
| 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`. |
|
|
421
|
-
| Installer/update command | `npm exec --yes codex-overleaf-link@1.3.
|
|
422
|
-
| Uninstall command | `npm exec --yes codex-overleaf-link@1.3.
|
|
340
|
+
| Installer/update command | `npm exec --yes codex-overleaf-link@1.3.6 -- install-native` | `npm exec --yes codex-overleaf-link@1.3.6 -- install-native` | `npm exec --yes codex-overleaf-link@1.3.6 -- install-native` | `npm exec --yes codex-overleaf-link@1.3.6 -- install-native --browser chromium` |
|
|
341
|
+
| Uninstall command | `npm exec --yes codex-overleaf-link@1.3.6 -- uninstall-native` | `npm exec --yes codex-overleaf-link@1.3.6 -- uninstall-native` | `npm exec --yes codex-overleaf-link@1.3.6 -- uninstall-native` | `npm exec --yes codex-overleaf-link@1.3.6 -- uninstall-native --browser chromium` |
|
|
423
342
|
| 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` |
|
|
424
343
|
| 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`. |
|
|
425
344
|
| 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. |
|
|
@@ -430,11 +349,11 @@ Use this matrix for release-candidate signoff and compatibility reports. Record
|
|
|
430
349
|
## Development
|
|
431
350
|
|
|
432
351
|
```bash
|
|
433
|
-
npm test
|
|
352
|
+
npm test # Node.js built-in test runner, zero dependencies
|
|
434
353
|
npm run check:architecture # enforce v1.0 final architecture budgets
|
|
435
354
|
npm run benchmark:large # run the synthetic large-project regression gate
|
|
436
|
-
npm run bridge
|
|
437
|
-
npm run install:native
|
|
355
|
+
npm run bridge # run the native host directly for protocol work
|
|
356
|
+
npm run install:native # reinstall native host after changing native-host/src or extension/src/shared
|
|
438
357
|
```
|
|
439
358
|
|
|
440
359
|
## Contributing
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
const MIN_NATIVE_VERSION = '1.0.0';
|
|
13
13
|
const MIN_COMPATIBLE_NATIVE_VERSION = '1.0.0';
|
|
14
14
|
const MIN_COMPATIBLE_EXTENSION_VERSION = '1.0.0';
|
|
15
|
-
const BUILD_TARGET_VERSION = '1.3.
|
|
15
|
+
const BUILD_TARGET_VERSION = '1.3.6';
|
|
16
16
|
const DEFAULT_CHROME_EXTENSION_ID = 'illdpneeeopfffmiepaejglgmhpmdhdc';
|
|
17
17
|
const REQUIRED_CAPABILITIES = Object.freeze([
|
|
18
18
|
'bridgePing',
|
|
@@ -155,15 +155,15 @@
|
|
|
155
155
|
switchLanguageHint: 'Change panel language',
|
|
156
156
|
close: 'Close',
|
|
157
157
|
closeDiagnostics: 'Close diagnostics result',
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
customInstructionsSubtitle: 'Give Codex extra instructions and context for this Overleaf project.',
|
|
161
|
-
customInstructionsLearnMore: 'Learn more',
|
|
162
|
-
customInstructionsClose: 'Close custom instructions',
|
|
158
|
+
settingsBack: 'Back',
|
|
159
|
+
projectSettings: 'Project Settings',
|
|
163
160
|
customInstructionsPlaceholder: 'Style, terminology, venue constraints, and LaTeX conventions for this project.',
|
|
164
|
-
projectSettingsSavedToast: 'Project settings saved.',
|
|
165
161
|
projectSettingsTitle: 'Project Settings',
|
|
166
|
-
projectSettingsSubtitle: '
|
|
162
|
+
projectSettingsSubtitle: 'Customize how Codex behaves in this and all projects.',
|
|
163
|
+
settingsScopeProjectTitle: 'This project',
|
|
164
|
+
settingsScopeProjectSubtitle: 'Instructions and rules applied to this Overleaf project only.',
|
|
165
|
+
settingsScopeGlobalTitle: 'All projects',
|
|
166
|
+
settingsScopeGlobalSubtitle: 'Skill loading settings that apply across all Overleaf projects.',
|
|
167
167
|
governanceRulesTitle: 'Governance Rules',
|
|
168
168
|
governanceReadonlyPatterns: 'Read-only patterns',
|
|
169
169
|
governanceWritablePatterns: 'Writable patterns',
|
|
@@ -173,13 +173,21 @@
|
|
|
173
173
|
sensitiveConfirmMessage: 'Codex found possible sensitive content. Raw detected secrets are not shown here. Continue only if this project context may be sent to Codex.',
|
|
174
174
|
sensitiveConfirmRun: 'Run anyway',
|
|
175
175
|
localSkillsTitle: 'Skills',
|
|
176
|
-
codexOverleafSkillsTitle: 'Codex Overleaf skills',
|
|
177
176
|
codexOverleafSkillsEmpty: 'No Codex Overleaf skills installed.',
|
|
178
177
|
codexOverleafSkillsDisabled: 'Codex Overleaf skills are disabled for runs.',
|
|
179
178
|
loadCodexLocalSkills: 'Load local Codex skills',
|
|
180
179
|
loadCodexOverleafSkills: 'Load Codex Overleaf skills',
|
|
181
180
|
localSkillRemove: 'Remove',
|
|
181
|
+
localSkillRemoveConfirm: 'Confirm',
|
|
182
|
+
localSkillRemoveCancel: 'Cancel',
|
|
183
|
+
localSkillRemoving: 'Removing…',
|
|
184
|
+
codexOverleafSkillsLoading: 'Loading skills…',
|
|
185
|
+
codexOverleafSkillEnableToggle: 'Enable this skill',
|
|
182
186
|
codexOverleafSkillRemoveDone: 'Codex Overleaf skill removed.',
|
|
187
|
+
codexOverleafSkillsTitle: 'Codex Overleaf skills',
|
|
188
|
+
codexOverleafSkillsEntry: 'Codex Overleaf skills',
|
|
189
|
+
codexOverleafSkillsSummaryOff: 'Off',
|
|
190
|
+
codexOverleafSkillsSummaryCount: '{count} enabled',
|
|
183
191
|
slashInstallSkillTitle: 'Install skill',
|
|
184
192
|
slashInstallSkillSubtitle: 'Use the Codex skill installer with natural language.',
|
|
185
193
|
slashUseSkillSubtitle: 'Use this skill for the next Codex turn.',
|
|
@@ -191,7 +199,8 @@
|
|
|
191
199
|
binaryAssetConfirm: 'Write assets',
|
|
192
200
|
binaryAssetCancel: 'Skip assets',
|
|
193
201
|
personalizationConfig: 'Personalization',
|
|
194
|
-
|
|
202
|
+
settingsSaved: 'Saved',
|
|
203
|
+
settingsSaving: 'Saving…',
|
|
195
204
|
technicalDetails: 'Technical Details',
|
|
196
205
|
newSession: 'New Session',
|
|
197
206
|
tasks: 'Tasks',
|
|
@@ -268,7 +277,10 @@
|
|
|
268
277
|
refreshProbeFailed: 'Refresh failed. Reload Overleaf and try again.',
|
|
269
278
|
processedFailed: 'Failed {elapsed}',
|
|
270
279
|
processing: 'Running {elapsed}',
|
|
271
|
-
processed: 'Done {elapsed}'
|
|
280
|
+
processed: 'Done {elapsed}',
|
|
281
|
+
restoredRunStoppedTitle: 'Stopped tracking this run after a page refresh',
|
|
282
|
+
restoredRunStoppedDetail: 'The plugin reloaded while this run was still marked in progress. It has been marked interrupted to avoid showing a stale status — run the task again to continue.',
|
|
283
|
+
restoredRunStoppedStatus: 'Stopped tracking after a page refresh'
|
|
272
284
|
},
|
|
273
285
|
zh: {
|
|
274
286
|
resizePanel: '拖动调整 Codex 面板宽度,双击恢复默认宽度',
|
|
@@ -414,15 +426,15 @@
|
|
|
414
426
|
switchLanguageHint: '切换面板语言',
|
|
415
427
|
close: '关闭',
|
|
416
428
|
closeDiagnostics: '关闭诊断结果',
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
customInstructionsSubtitle: '为当前 Overleaf 项目提供额外指令和上下文。',
|
|
420
|
-
customInstructionsLearnMore: '了解更多',
|
|
421
|
-
customInstructionsClose: '关闭自定义指令',
|
|
429
|
+
settingsBack: '返回',
|
|
430
|
+
projectSettings: '项目设置',
|
|
422
431
|
customInstructionsPlaceholder: '写下此项目的风格、术语、会议要求和 LaTeX 约定。',
|
|
423
|
-
projectSettingsSavedToast: '项目设置已保存。',
|
|
424
432
|
projectSettingsTitle: '项目设置',
|
|
425
|
-
projectSettingsSubtitle: '
|
|
433
|
+
projectSettingsSubtitle: '自定义 Codex 在当前项目和所有项目中的行为。',
|
|
434
|
+
settingsScopeProjectTitle: '当前项目',
|
|
435
|
+
settingsScopeProjectSubtitle: '仅应用于当前 Overleaf 项目的指令和规则。',
|
|
436
|
+
settingsScopeGlobalTitle: '所有项目',
|
|
437
|
+
settingsScopeGlobalSubtitle: '适用于所有 Overleaf 项目的技能加载设置。',
|
|
426
438
|
governanceRulesTitle: '治理规则',
|
|
427
439
|
governanceReadonlyPatterns: '只读路径规则',
|
|
428
440
|
governanceWritablePatterns: '可写路径规则',
|
|
@@ -432,13 +444,21 @@
|
|
|
432
444
|
sensitiveConfirmMessage: 'Codex 发现了可能的敏感内容。这里不会显示原始密钥或秘密值。只有在确认可以把这些项目上下文发送给 Codex 时才继续。',
|
|
433
445
|
sensitiveConfirmRun: '仍然运行',
|
|
434
446
|
localSkillsTitle: '技能',
|
|
435
|
-
codexOverleafSkillsTitle: 'Codex Overleaf 专属技能',
|
|
436
447
|
codexOverleafSkillsEmpty: '没有安装 Codex Overleaf 专属技能。',
|
|
437
448
|
codexOverleafSkillsDisabled: '运行时已禁用 Codex Overleaf 专属技能。',
|
|
438
449
|
loadCodexLocalSkills: '加载 Codex 本地技能',
|
|
439
450
|
loadCodexOverleafSkills: '加载 Codex Overleaf 专属技能',
|
|
440
451
|
localSkillRemove: '删除',
|
|
452
|
+
localSkillRemoveConfirm: '确认',
|
|
453
|
+
localSkillRemoveCancel: '取消',
|
|
454
|
+
localSkillRemoving: '删除中…',
|
|
455
|
+
codexOverleafSkillsLoading: '正在加载技能…',
|
|
456
|
+
codexOverleafSkillEnableToggle: '启用该技能',
|
|
441
457
|
codexOverleafSkillRemoveDone: 'Codex Overleaf 技能已删除。',
|
|
458
|
+
codexOverleafSkillsTitle: 'Codex Overleaf 专属技能',
|
|
459
|
+
codexOverleafSkillsEntry: 'Codex Overleaf 专属技能',
|
|
460
|
+
codexOverleafSkillsSummaryOff: '已关闭',
|
|
461
|
+
codexOverleafSkillsSummaryCount: '已启用 {count} 个',
|
|
442
462
|
slashInstallSkillTitle: '安装 skill',
|
|
443
463
|
slashInstallSkillSubtitle: '用自然语言调用 Codex 的 skill installer。',
|
|
444
464
|
slashUseSkillSubtitle: '本轮使用这个 skill。',
|
|
@@ -450,7 +470,8 @@
|
|
|
450
470
|
binaryAssetConfirm: '写入资源',
|
|
451
471
|
binaryAssetCancel: '跳过资源',
|
|
452
472
|
personalizationConfig: '个性化配置',
|
|
453
|
-
|
|
473
|
+
settingsSaved: '已保存',
|
|
474
|
+
settingsSaving: '保存中…',
|
|
454
475
|
technicalDetails: '技术细节',
|
|
455
476
|
newSession: '新建会话',
|
|
456
477
|
tasks: '任务',
|
|
@@ -527,7 +548,10 @@
|
|
|
527
548
|
refreshProbeFailed: '检测失败:请刷新 Overleaf 页面后重试',
|
|
528
549
|
processedFailed: '处理失败 {elapsed}',
|
|
529
550
|
processing: '处理中 {elapsed}',
|
|
530
|
-
processed: '已处理 {elapsed}'
|
|
551
|
+
processed: '已处理 {elapsed}',
|
|
552
|
+
restoredRunStoppedTitle: '页面刷新后已停止跟踪这轮任务',
|
|
553
|
+
restoredRunStoppedDetail: '插件重新加载时发现这轮任务还标记为处理中。为了避免继续显示过期状态,已把它标记为中断;可以重新运行任务。',
|
|
554
|
+
restoredRunStoppedStatus: '页面刷新后已停止跟踪'
|
|
531
555
|
}
|
|
532
556
|
};
|
|
533
557
|
|
|
@@ -13,8 +13,9 @@
|
|
|
13
13
|
'markdown-link-target'
|
|
14
14
|
]);
|
|
15
15
|
const TEXT_EXTENSION_PATTERN = '(?:tex|bib|sty|cls|bst|bbx|cbx|lbx|cfg|def|clo|ist|txt|md|latex)';
|
|
16
|
-
const
|
|
17
|
-
const
|
|
16
|
+
const CJK_PUNCTUATION = '、,;。!?:';
|
|
17
|
+
const REFERENCE_PREFIX_PATTERN = `(^|[\\s\\[({\"',;${CJK_PUNCTUATION}])`;
|
|
18
|
+
const PATH_PATTERN = `([^\\s\\[\\](){}<>"'\`,;${CJK_PUNCTUATION}]+?\\.${TEXT_EXTENSION_PATTERN})`;
|
|
18
19
|
const BARE_LOCAL_PATH_PATTERN = /(?:file:\/\/\/?[^\s)\]]+|[A-Za-z]:[\\/][^\s)\]]+|\/(?:Users|home|private|var|tmp)\/[^\s)\]]+|[^\s)\]]*[\\/]\.codex-overleaf[\\/]projects[\\/][^\s)\]]+)/gi;
|
|
19
20
|
|
|
20
21
|
function parseLineReferencesFromText({ text, mode }) {
|
|
@@ -76,9 +77,6 @@
|
|
|
76
77
|
placeholderBrackets: true
|
|
77
78
|
});
|
|
78
79
|
|
|
79
|
-
if (context === 'render' || context === 'persist') {
|
|
80
|
-
return sanitized;
|
|
81
|
-
}
|
|
82
80
|
return sanitized;
|
|
83
81
|
}
|
|
84
82
|
|
|
@@ -460,7 +458,7 @@
|
|
|
460
458
|
}
|
|
461
459
|
|
|
462
460
|
function splitTrailingPunctuation(value) {
|
|
463
|
-
const match = String(value || '').match(/^(.*?)([
|
|
461
|
+
const match = String(value || '').match(/^(.*?)([.,;!?、,;。!?:]+)$/);
|
|
464
462
|
if (!match) {
|
|
465
463
|
return { value, trailing: '' };
|
|
466
464
|
}
|