texlite 0.18.0 → 0.19.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/DESIGN.md +357 -21
- package/NPM_TESTING.md +23 -0
- package/OPERATIONS.md +185 -6
- package/README.md +4 -2
- package/README.zh-CN.md +3 -2
- package/THIRD_PARTY_NOTICES.md +73 -0
- package/dist/client/assets/AdminUsers-DXWi8wl0.js +1 -0
- package/dist/client/assets/AdminUsers-DXWi8wl0.js.br +0 -0
- package/dist/client/assets/AdminUsers-DXWi8wl0.js.gz +0 -0
- package/dist/client/assets/AgentIcon-BlHvdrRo.js +1 -0
- package/dist/client/assets/AgentIcon-BlHvdrRo.js.br +0 -0
- package/dist/client/assets/AgentIcon-BlHvdrRo.js.gz +0 -0
- package/dist/client/assets/AgentIcon-DE7FEpRY.css +1 -0
- package/dist/client/assets/AgentIcon-DE7FEpRY.css.br +0 -0
- package/dist/client/assets/AgentIcon-DE7FEpRY.css.gz +0 -0
- package/dist/client/assets/AgentManagement-CDWaxEmP.js +1 -0
- package/dist/client/assets/AgentManagement-CDWaxEmP.js.br +0 -0
- package/dist/client/assets/AgentManagement-CDWaxEmP.js.gz +0 -0
- package/dist/client/assets/AgentTerminal-BXH3gHWm.js +2 -0
- package/dist/client/assets/AgentTerminal-BXH3gHWm.js.br +0 -0
- package/dist/client/assets/AgentTerminal-BXH3gHWm.js.gz +0 -0
- package/dist/client/assets/AgentTerminalSurface-B5LH8GIb.css +1 -0
- package/dist/client/assets/AgentTerminalSurface-B5LH8GIb.css.br +0 -0
- package/dist/client/assets/AgentTerminalSurface-B5LH8GIb.css.gz +0 -0
- package/dist/client/assets/AgentTerminalSurface-D0MLcJmw.js +16 -0
- package/dist/client/assets/AgentTerminalSurface-D0MLcJmw.js.br +0 -0
- package/dist/client/assets/AgentTerminalSurface-D0MLcJmw.js.gz +0 -0
- package/dist/client/assets/{AvatarSettingsDialog-CIPKapVe.js → AvatarSettingsDialog-CtbzavqH.js} +1 -1
- package/dist/client/assets/AvatarSettingsDialog-CtbzavqH.js.br +0 -0
- package/dist/client/assets/AvatarSettingsDialog-CtbzavqH.js.gz +0 -0
- package/dist/client/assets/{CitationLibraryDialog-BhZX8BV2.js → CitationLibraryDialog-CnQVjovw.js} +1 -1
- package/dist/client/assets/CitationLibraryDialog-CnQVjovw.js.br +0 -0
- package/dist/client/assets/CitationLibraryDialog-CnQVjovw.js.gz +0 -0
- package/dist/client/assets/Dashboard-Dzq1oMZU.js +5 -0
- package/dist/client/assets/Dashboard-Dzq1oMZU.js.br +0 -0
- package/dist/client/assets/Dashboard-Dzq1oMZU.js.gz +0 -0
- package/dist/client/assets/GitDialog-CzgguGGW.js +3 -0
- package/dist/client/assets/GitDialog-CzgguGGW.js.br +0 -0
- package/dist/client/assets/GitDialog-CzgguGGW.js.gz +0 -0
- package/dist/client/assets/{GitHubAccountDialog-hosK9cLW.js → GitHubAccountDialog-lRAWfkKP.js} +1 -1
- package/dist/client/assets/GitHubAccountDialog-lRAWfkKP.js.br +0 -0
- package/dist/client/assets/GitHubAccountDialog-lRAWfkKP.js.gz +0 -0
- package/dist/client/assets/{GitHubIcon-DNR0CleM.js → GitHubIcon-BPTVKTrM.js} +1 -1
- package/dist/client/assets/HistoryDialog-Bw3GHfbM.js +8 -0
- package/dist/client/assets/HistoryDialog-Bw3GHfbM.js.br +0 -0
- package/dist/client/assets/HistoryDialog-Bw3GHfbM.js.gz +0 -0
- package/dist/client/assets/{LatexEditor-BzAk3WQM.js → LatexEditor-BDpqgoOa.js} +2 -2
- package/dist/client/assets/LatexEditor-BDpqgoOa.js.br +0 -0
- package/dist/client/assets/LatexEditor-BDpqgoOa.js.gz +0 -0
- package/dist/client/assets/PdfPreview-C2puKgCh.js +1 -0
- package/dist/client/assets/PdfPreview-C2puKgCh.js.br +0 -0
- package/dist/client/assets/PdfPreview-C2puKgCh.js.gz +0 -0
- package/dist/client/assets/{ProjectIconPickerDialog-D8Uo4H10.js → ProjectIconPickerDialog-BzNdyAz6.js} +1 -1
- package/dist/client/assets/ProjectIconPickerDialog-BzNdyAz6.js.br +0 -0
- package/dist/client/assets/ProjectIconPickerDialog-BzNdyAz6.js.gz +0 -0
- package/dist/client/assets/ProjectSettings-B_y5nRgp.js +4 -0
- package/dist/client/assets/ProjectSettings-B_y5nRgp.js.br +0 -0
- package/dist/client/assets/ProjectSettings-B_y5nRgp.js.gz +0 -0
- package/dist/client/assets/ProjectWorkspace-BnT5JPTA.js +30 -0
- package/dist/client/assets/ProjectWorkspace-BnT5JPTA.js.br +0 -0
- package/dist/client/assets/ProjectWorkspace-BnT5JPTA.js.gz +0 -0
- package/dist/client/assets/{QuickOpenDialog-CyqeckBM.js → QuickOpenDialog-CEYxIk4l.js} +1 -1
- package/dist/client/assets/QuickOpenDialog-CEYxIk4l.js.br +0 -0
- package/dist/client/assets/QuickOpenDialog-CEYxIk4l.js.gz +0 -0
- package/dist/client/assets/SelectionHistoryDialog-DBL6vVD4.js +3 -0
- package/dist/client/assets/SelectionHistoryDialog-DBL6vVD4.js.br +0 -0
- package/dist/client/assets/SelectionHistoryDialog-DBL6vVD4.js.gz +0 -0
- package/dist/client/assets/SuccessNotice-C8XV7MAJ.js +1 -0
- package/dist/client/assets/SystemMetricsDialog-D2EQX5hh.js +1 -0
- package/dist/client/assets/SystemMetricsDialog-D2EQX5hh.js.br +0 -0
- package/dist/client/assets/SystemMetricsDialog-D2EQX5hh.js.gz +0 -0
- package/dist/client/assets/{TagColorSelect-D3T-rw4K.js → TagColorSelect-CfJaFovr.js} +1 -1
- package/dist/client/assets/TagManagementDialog-CiJ6AhVk.js +1 -0
- package/dist/client/assets/TagManagementDialog-CiJ6AhVk.js.br +0 -0
- package/dist/client/assets/TagManagementDialog-CiJ6AhVk.js.gz +0 -0
- package/dist/client/assets/{WordCountDialog-Bp8kYngA.js → WordCountDialog-DaHxqArj.js} +1 -1
- package/dist/client/assets/WordCountDialog-DaHxqArj.js.br +0 -0
- package/dist/client/assets/WordCountDialog-DaHxqArj.js.gz +0 -0
- package/dist/client/assets/arrow-down-BySB1dS6.js +1 -0
- package/dist/client/assets/check-B-GEn6vk.js +1 -0
- package/dist/client/assets/chevron-up-B0yLKMZJ.js +1 -0
- package/dist/client/assets/{chktex-BcGmZVUy.js → chktex-B2-niLAo.js} +1 -1
- package/dist/client/assets/circle-check-CfK-oqlC.js +1 -0
- package/dist/client/assets/{clock-3-x2vcGFSH.js → clock-3-C_8q2yLj.js} +1 -1
- package/dist/client/assets/{dist-D5mbpudl.js → dist-CIxSPQK5.js} +1 -1
- package/dist/client/assets/dist-CIxSPQK5.js.br +0 -0
- package/dist/client/assets/dist-CIxSPQK5.js.gz +0 -0
- package/dist/client/assets/{eye-CvzXPIMu.js → eye-DpIOhQ2p.js} +1 -1
- package/dist/client/assets/{hard-drive-BeGQ5o79.js → hard-drive-DRbINIYf.js} +1 -1
- package/dist/client/assets/i18n-BzlyqR_B.js +13 -0
- package/dist/client/assets/i18n-BzlyqR_B.js.br +0 -0
- package/dist/client/assets/i18n-BzlyqR_B.js.gz +0 -0
- package/dist/client/assets/index-BHHBwQuG.css +1 -0
- package/dist/client/assets/index-BHHBwQuG.css.br +0 -0
- package/dist/client/assets/index-BHHBwQuG.css.gz +0 -0
- package/dist/client/assets/index-h0BVkT8k.js +42 -0
- package/dist/client/assets/index-h0BVkT8k.js.br +0 -0
- package/dist/client/assets/index-h0BVkT8k.js.gz +0 -0
- package/dist/client/assets/info-DB-RajXx.js +1 -0
- package/dist/client/assets/{minimize-2-yYMmsVER.js → minimize-2-DtsKyo4M.js} +1 -1
- package/dist/client/assets/{minus-CNHOVLWS.js → minus-CdwrG9Yo.js} +1 -1
- package/dist/client/assets/plus-PHvPlka_.js +1 -0
- package/dist/client/assets/{refresh-cw-B7vZa5K2.js → refresh-cw-c6Tzy-hb.js} +1 -1
- package/dist/client/assets/relativeTime-Cf5dzFc9.js +1 -0
- package/dist/client/assets/relativeTime-Cf5dzFc9.js.br +0 -0
- package/dist/client/assets/relativeTime-Cf5dzFc9.js.gz +0 -0
- package/dist/client/assets/{search-Czv3qsBy.js → search-Cy8DgYGb.js} +1 -1
- package/dist/client/assets/{spellCheck-DDCaK8Yx.js → spellCheck-DEQIFH7w.js} +1 -1
- package/dist/client/assets/spellCheck-DEQIFH7w.js.br +0 -0
- package/dist/client/assets/spellCheck-DEQIFH7w.js.gz +0 -0
- package/dist/client/assets/{tags-CLK7WRSs.js → tags-BQ0exG-g.js} +1 -1
- package/dist/client/assets/terminal-DaAc1558.js +1 -0
- package/dist/client/assets/terminalPreferences-CgacIg2F.js +1 -0
- package/dist/client/assets/terminalPreferences-CgacIg2F.js.br +0 -0
- package/dist/client/assets/terminalPreferences-CgacIg2F.js.gz +0 -0
- package/dist/client/assets/{type-NT195OCy.js → type-Cm3TiSO6.js} +1 -1
- package/dist/client/assets/{user-plus-BRuwNzcg.js → user-plus-BLC3_SFQ.js} +1 -1
- package/dist/client/index.html +13 -7
- package/dist/server/agents/adapters/claude.js +19 -0
- package/dist/server/agents/adapters/codex.js +47 -0
- package/dist/server/agents/adapters/common.js +86 -0
- package/dist/server/agents/adapters/opencode.js +184 -0
- package/dist/server/agents/adapters/types.js +1 -0
- package/dist/server/agents/execution.js +147 -0
- package/dist/server/agents/launcher.js +57 -0
- package/dist/server/agents/processIdentity.js +63 -0
- package/dist/server/agents/registry.js +72 -0
- package/dist/server/agents/sessions.js +564 -0
- package/dist/server/agents/terminal.js +84 -0
- package/dist/server/agents/workspaces.js +341 -0
- package/dist/server/app.js +32 -1
- package/dist/server/cli.js +19 -47
- package/dist/server/collaboration.js +62 -35
- package/dist/server/compileArtifacts.js +11 -44
- package/dist/server/compiler.js +16 -38
- package/dist/server/config.js +8 -2
- package/dist/server/db.js +28 -0
- package/dist/server/editHistory.js +59 -65
- package/dist/server/history.js +28 -13
- package/dist/server/i18n.js +26 -8
- package/dist/server/latexRoot.js +4 -2
- package/dist/server/locales/zh-Hant.js +145 -0
- package/dist/server/lucideIcons.js +14 -17
- package/dist/server/projectMutations.js +21 -0
- package/dist/server/routes/agents.js +135 -0
- package/dist/server/routes/compile.js +23 -43
- package/dist/server/routes/projectHistory.js +13 -6
- package/dist/server/routes/projects.js +15 -23
- package/dist/shared/agentMessages.js +51 -0
- package/dist/shared/agentProtocol.js +41 -0
- package/dist/shared/historyFiles.js +1 -1
- package/dist/shared/historyTracking.js +2 -0
- package/dist/shared/locales.js +21 -0
- package/package.json +7 -3
- package/templates/agents/AGENTS.md +135 -0
- package/texlite.config.example.json +3 -2
- package/dist/client/assets/AdminUsers-rPpYTAU6.js +0 -1
- package/dist/client/assets/AdminUsers-rPpYTAU6.js.br +0 -0
- package/dist/client/assets/AdminUsers-rPpYTAU6.js.gz +0 -0
- package/dist/client/assets/AvatarSettingsDialog-CIPKapVe.js.br +0 -0
- package/dist/client/assets/AvatarSettingsDialog-CIPKapVe.js.gz +0 -0
- package/dist/client/assets/CitationLibraryDialog-BhZX8BV2.js.br +0 -0
- package/dist/client/assets/CitationLibraryDialog-BhZX8BV2.js.gz +0 -0
- package/dist/client/assets/Dashboard-DppEhsjL.js +0 -5
- package/dist/client/assets/Dashboard-DppEhsjL.js.br +0 -0
- package/dist/client/assets/Dashboard-DppEhsjL.js.gz +0 -0
- package/dist/client/assets/GitDialog-BOu46hxA.js +0 -3
- package/dist/client/assets/GitDialog-BOu46hxA.js.br +0 -0
- package/dist/client/assets/GitDialog-BOu46hxA.js.gz +0 -0
- package/dist/client/assets/GitHubAccountDialog-hosK9cLW.js.br +0 -0
- package/dist/client/assets/GitHubAccountDialog-hosK9cLW.js.gz +0 -0
- package/dist/client/assets/HistoryDialog-BdkuEl8r.js +0 -8
- package/dist/client/assets/HistoryDialog-BdkuEl8r.js.br +0 -0
- package/dist/client/assets/HistoryDialog-BdkuEl8r.js.gz +0 -0
- package/dist/client/assets/LatexEditor-BzAk3WQM.js.br +0 -0
- package/dist/client/assets/LatexEditor-BzAk3WQM.js.gz +0 -0
- package/dist/client/assets/PdfPreview-DkjI1eCo.js +0 -1
- package/dist/client/assets/PdfPreview-DkjI1eCo.js.br +0 -0
- package/dist/client/assets/PdfPreview-DkjI1eCo.js.gz +0 -0
- package/dist/client/assets/ProjectIconPickerDialog-D8Uo4H10.js.br +0 -0
- package/dist/client/assets/ProjectIconPickerDialog-D8Uo4H10.js.gz +0 -0
- package/dist/client/assets/ProjectSettings-Jdr94nOc.js +0 -1
- package/dist/client/assets/ProjectSettings-Jdr94nOc.js.br +0 -0
- package/dist/client/assets/ProjectSettings-Jdr94nOc.js.gz +0 -0
- package/dist/client/assets/ProjectWorkspace-D9v3Jj8T.js +0 -30
- package/dist/client/assets/ProjectWorkspace-D9v3Jj8T.js.br +0 -0
- package/dist/client/assets/ProjectWorkspace-D9v3Jj8T.js.gz +0 -0
- package/dist/client/assets/QuickOpenDialog-CyqeckBM.js.br +0 -0
- package/dist/client/assets/QuickOpenDialog-CyqeckBM.js.gz +0 -0
- package/dist/client/assets/SelectionHistoryDialog-Dlutex-A.js +0 -3
- package/dist/client/assets/SelectionHistoryDialog-Dlutex-A.js.br +0 -0
- package/dist/client/assets/SelectionHistoryDialog-Dlutex-A.js.gz +0 -0
- package/dist/client/assets/SystemMetricsDialog-CCWxXw6g.js +0 -1
- package/dist/client/assets/SystemMetricsDialog-CCWxXw6g.js.br +0 -0
- package/dist/client/assets/SystemMetricsDialog-CCWxXw6g.js.gz +0 -0
- package/dist/client/assets/TagManagementDialog-CxjrSX-o.js +0 -1
- package/dist/client/assets/TagManagementDialog-CxjrSX-o.js.br +0 -0
- package/dist/client/assets/TagManagementDialog-CxjrSX-o.js.gz +0 -0
- package/dist/client/assets/WordCountDialog-Bp8kYngA.js.br +0 -0
- package/dist/client/assets/WordCountDialog-Bp8kYngA.js.gz +0 -0
- package/dist/client/assets/check-DFoA73zZ.js +0 -1
- package/dist/client/assets/chevron-up-C8DyKLxi.js +0 -1
- package/dist/client/assets/dist-D5mbpudl.js.br +0 -0
- package/dist/client/assets/dist-D5mbpudl.js.gz +0 -0
- package/dist/client/assets/i18n-CRWKZA6W.js +0 -9
- package/dist/client/assets/i18n-CRWKZA6W.js.br +0 -0
- package/dist/client/assets/i18n-CRWKZA6W.js.gz +0 -0
- package/dist/client/assets/index-D0eqhDpZ.js +0 -42
- package/dist/client/assets/index-D0eqhDpZ.js.br +0 -0
- package/dist/client/assets/index-D0eqhDpZ.js.gz +0 -0
- package/dist/client/assets/index-DnhiIb1V.css +0 -1
- package/dist/client/assets/index-DnhiIb1V.css.br +0 -0
- package/dist/client/assets/index-DnhiIb1V.css.gz +0 -0
- package/dist/client/assets/plus-BDquy76g.js +0 -1
- package/dist/client/assets/relativeTime-DuOytR_J.js +0 -1
- package/dist/client/assets/relativeTime-DuOytR_J.js.br +0 -0
- package/dist/client/assets/relativeTime-DuOytR_J.js.gz +0 -0
- package/dist/client/assets/sigma-CI6gmAkl.js +0 -1
- package/dist/client/assets/spellCheck-DDCaK8Yx.js.br +0 -0
- package/dist/client/assets/spellCheck-DDCaK8Yx.js.gz +0 -0
- package/preview-1.png +0 -0
- package/preview-2.png +0 -0
package/DESIGN.md
CHANGED
|
@@ -34,14 +34,22 @@ and day-to-day operation.
|
|
|
34
34
|
| Formatting | Browser-side `tex-fmt` WASM package and `bibtex-tidy` |
|
|
35
35
|
| Git backup | Optional host Git and the GitHub REST API |
|
|
36
36
|
| Process management | Foreground `serve`, or the bundled PM2 lifecycle commands |
|
|
37
|
+
| External tool terminals | Administrator opt-in; adapter-based host CLIs, optional `node-pty`, lazy xterm.js UI, independent task working copies |
|
|
37
38
|
|
|
38
39
|
## Localization
|
|
39
40
|
|
|
40
|
-
The browser owns interface copy through
|
|
41
|
-
in `src/client/locales`.
|
|
41
|
+
The browser owns interface copy through English (`en`), Simplified Chinese (`zh`),
|
|
42
|
+
and Traditional Chinese (`zh-Hant`) JSON resources in `src/client/locales`.
|
|
43
|
+
The shared locale resolver preserves existing `zh` preferences and recognizes
|
|
44
|
+
`zh-TW`, `zh-HK`, and `zh-MO` as Traditional Chinese; an explicit `Hans` or
|
|
45
|
+
`Hant` script takes precedence over the region. Saved choices take precedence
|
|
46
|
+
over browser preferences. The active locale also drives the HTML language and
|
|
47
|
+
localized dates and relative times. API errors use stable codes rather than route-local
|
|
42
48
|
human text. The server resolves those codes through `src/server/i18n.ts` using
|
|
43
49
|
the request's `Accept-Language` header; the browser API helper always supplies
|
|
44
|
-
its active language
|
|
50
|
+
its active language for both JSON requests and ZIP uploads. The server honors
|
|
51
|
+
language preference weights and uses matching Traditional Chinese messages;
|
|
52
|
+
unmatched or non-browser requests fall back to
|
|
45
53
|
English. This keeps direct API clients usable while allowing the React client
|
|
46
54
|
to retain its more contextual local translations.
|
|
47
55
|
|
|
@@ -51,6 +59,11 @@ in route, filesystem, Git, or compiler-control code. Operational logs and
|
|
|
51
59
|
raw LaTeX output remain in their original form, so they can be searched and
|
|
52
60
|
diagnosed without changing behavior by browser language.
|
|
53
61
|
|
|
62
|
+
Traditional Chinese is a separately maintained catalog, not a runtime character
|
|
63
|
+
conversion. Use consistent terminology such as 專案, 檔案, 原始碼, 儲存庫,
|
|
64
|
+
and 批註 (collaborative comments). Tests check catalog keys, interpolation
|
|
65
|
+
variables, rich-text tags, language detection, persistence, and API headers.
|
|
66
|
+
|
|
54
67
|
### Citation library
|
|
55
68
|
|
|
56
69
|
The citation library is stored in SQLite and is independent of project source
|
|
@@ -142,7 +155,12 @@ collaboration drafts and layout preferences include the mount point in their
|
|
|
142
155
|
storage namespace so two instances under one origin cannot share local state.
|
|
143
156
|
|
|
144
157
|
`texlite init` creates the configuration when necessary and creates the first
|
|
145
|
-
administrator.
|
|
158
|
+
administrator. New configuration files contain only explicit initialization
|
|
159
|
+
choices: a supplied site name/contact email and host, port, base-path or data
|
|
160
|
+
directory overrides. Accepting all defaults can produce an empty JSON object;
|
|
161
|
+
omitted options use runtime defaults and can follow future default changes.
|
|
162
|
+
Existing configuration files are never automatically rewritten or stripped.
|
|
163
|
+
The server refuses to start without at least one active
|
|
146
164
|
administrator; public registration is not enabled. Configuration values are
|
|
147
165
|
validated before environment checks, database opening, or binding the HTTP
|
|
148
166
|
listener. Validation covers paths, limits, engines, timeout/queue settings,
|
|
@@ -276,8 +294,17 @@ session exists and remounts only when that session is replaced. The
|
|
|
276
294
|
collaboration hook owns subscriptions; the session boundary owns resources.
|
|
277
295
|
Ordinary file, permission and UI updates retain the current session, and
|
|
278
296
|
leaving never deletes the persisted offline draft. A client DOM regression
|
|
279
|
-
test exercises StrictMode replay, identity changes and cleanup
|
|
280
|
-
|
|
297
|
+
test exercises StrictMode replay, identity changes and cleanup.
|
|
298
|
+
|
|
299
|
+
Workspace connection status distinguishes opening the socket (`connecting`),
|
|
300
|
+
an open socket awaiting document synchronization (`syncing`), a synchronized
|
|
301
|
+
connection (`connected`), and an actual connection failure (`disconnected`).
|
|
302
|
+
Only a synchronized connection enables editing. Connection labels overlay
|
|
303
|
+
save progress rather than overwrite it, so a successful reconnect cannot leave
|
|
304
|
+
an old offline label behind. The retained-draft notice is shown on disconnect
|
|
305
|
+
only when there are pending local edits or a recoverable browser draft. Client
|
|
306
|
+
DOM tests cover startup, synchronization, failed connections, retries and
|
|
307
|
+
subscription cleanup without changing or deleting the draft.
|
|
281
308
|
|
|
282
309
|
Read permission is intentionally different from edit permission: read-only
|
|
283
310
|
members cannot modify source files, but can view the project and add or reply
|
|
@@ -561,17 +588,32 @@ checkpoint also captures currently excluded files that will be overwritten or
|
|
|
561
588
|
deleted (including attachments affected by legacy restores), without changing
|
|
562
589
|
project tracking settings. Failure to save that checkpoint aborts restoration.
|
|
563
590
|
Explicitly included non-text attachments are shown as a compact change notice
|
|
564
|
-
without decoding a text diff.
|
|
591
|
+
without decoding a text diff. Automatic recording and text comparison share
|
|
592
|
+
the same file-kind and UTF-8 content classifier, rather than separate extension
|
|
593
|
+
lists (including Windows batch scripts and text with unfamiliar extensions).
|
|
594
|
+
New manifest entries cache this classification from the bytes already read
|
|
595
|
+
during recording. Snapshot details expose it for changed files, including
|
|
596
|
+
deleted files when the previous snapshot is available. Older snapshots are
|
|
597
|
+
classified on demand within the text-preview size limit without rewriting
|
|
598
|
+
their manifests; missing objects and oversized previews retain their normal
|
|
599
|
+
comparison errors. Source and
|
|
565
600
|
ordinary text/data formats support bounded UTF-8 comparisons, including file
|
|
566
601
|
deletions; invalid or oversized text is reported as unavailable, not as unchanged.
|
|
567
602
|
|
|
568
603
|
After a source write succeeds, connection-originated Yjs text deltas are also
|
|
569
604
|
stored as ordered edit segments. Each segment belongs to exactly one user, one
|
|
570
605
|
file, and one operation type (`edit` or `format`). The edit records store only
|
|
571
|
-
positional replacements and
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
606
|
+
positional replacements with complete deleted and inserted text, rather than
|
|
607
|
+
per-edit whole-file snapshots. Browser and agent edits use the same lossless
|
|
608
|
+
span encoding; only displayed passage previews are shortened. Older truncated
|
|
609
|
+
records remain readable but cannot reconstruct affected earlier passages.
|
|
610
|
+
The records live in SQLite separately from recovery snapshots and are retained
|
|
611
|
+
as the newest 20,000 project segments (`editHistory.maxSegments`) within an
|
|
612
|
+
independent 64 MB serialized payload budget (`editHistory.maxStorageMB`). Both
|
|
613
|
+
settings are optional; omitted values use these defaults. Explicit existing
|
|
614
|
+
limits are preserved. Selection-history reads stream records and stop when
|
|
615
|
+
the requested display windows are complete, rather than loading all retained
|
|
616
|
+
payloads at once. This budget never shares or
|
|
575
617
|
reduces the 128 MB recovery-snapshot budget. A too-large individual edit burst
|
|
576
618
|
is omitted, and retention removes the oldest records; both deliberately create
|
|
577
619
|
a visible history boundary rather than presenting an unsafe attribution. When selection history is viewed,
|
|
@@ -671,11 +713,10 @@ Workspace resizing uses `react-resizable-panels` v4 (`Group`, `Panel`,
|
|
|
671
713
|
would mean pixels. The editor and preview share the space remaining after the
|
|
672
714
|
file panel and optional drawer. Each visible panel combination keeps its own
|
|
673
715
|
browser layout using `useDefaultLayout` and a storage adapter scoped to the
|
|
674
|
-
deployment base path. The adapter validates
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
falls back to usable defaults. File-panel collapse state follows `onResize`.
|
|
716
|
+
deployment base path. The adapter validates current v4 per-combination records
|
|
717
|
+
and does not convert v2 layout arrays. Missing, unsupported or corrupt records
|
|
718
|
+
use default sizes; older browser records are left untouched. Blocked browser
|
|
719
|
+
storage also falls back to usable defaults. File-panel collapse state follows `onResize`.
|
|
679
720
|
SyncTeX arrows are portalled outside the group and anchored to the separator,
|
|
680
721
|
so v4's document-level drag capture does not consume their pointer/keyboard
|
|
681
722
|
actions. Observers and window listeners are removed when the separator unmounts.
|
|
@@ -718,7 +759,10 @@ prose, subdued cool-gray comments and quieter line numbers. One browser-local
|
|
|
718
759
|
light/dark/system preference controls the whole application and editor. The
|
|
719
760
|
dashboard user popover groups identity, GitHub integration, language, theme and
|
|
720
761
|
sign-out controls. Explicit light/dark selections remain unchanged; system mode
|
|
721
|
-
follows OS color-scheme changes while the page is open.
|
|
762
|
+
follows OS color-scheme changes while the page is open. New browsers default to
|
|
763
|
+
System; existing explicit Light/Dark choices are preserved. Missing or blocked
|
|
764
|
+
browser storage follows the system too, with Light as the fallback when media
|
|
765
|
+
queries are unavailable. The pre-paint script uses the same resolution rules.
|
|
722
766
|
It is stored in localStorage
|
|
723
767
|
(scoped to the deployment base path), never in the database or tied to a
|
|
724
768
|
user/project. Other tabs follow
|
|
@@ -835,6 +879,13 @@ uses a process-wide queue capped at eight checks across projects and users. Its
|
|
|
835
879
|
LaTeX writing diagnostics use a blue-gray dotted underline and never replace
|
|
836
880
|
the compile diagnostics; the setting is off by default.
|
|
837
881
|
|
|
882
|
+
Both writing-check endpoints require a page-local UUID `clientId` and a
|
|
883
|
+
positive safe-integer `sequence` with each source request. Missing identifiers
|
|
884
|
+
return HTTP 409 `CLIENT_UPDATE_REQUIRED` with a localized save-and-reload hint;
|
|
885
|
+
malformed identifiers return HTTP 400. There is no session-cookie lane fallback.
|
|
886
|
+
The server always scopes lanes by project, authenticated user, client and file.
|
|
887
|
+
It never forces a browser reload or discards local edits for this error.
|
|
888
|
+
|
|
838
889
|
Formatting is independent from the editor's local appearance. A user can
|
|
839
890
|
manually format a selection or enable the per-user/per-project “format before
|
|
840
891
|
compile” preference. The browser uses bundled `tex-fmt` WASM for `.tex`, `.cls`,
|
|
@@ -848,6 +899,9 @@ localized messages; a failed or timed-out worker is discarded and recreated on
|
|
|
848
899
|
the next format attempt, with a 30-second request timeout. Citation-library form
|
|
849
900
|
validation remains in the browser's main thread. A formatter failure reports an
|
|
850
901
|
error but does not prevent compilation. There is no silent Prettier fallback.
|
|
902
|
+
Missing, non-string or oversized stored TOML values use `wrap = false`; an explicitly
|
|
903
|
+
saved empty string uses tex-fmt's own defaults. The browser no longer guesses
|
|
904
|
+
whether an empty value came from an older default or requires a migration marker.
|
|
851
905
|
|
|
852
906
|
Before a formatter computes a replacement it acquires a short-lived, per-file
|
|
853
907
|
lease from the live Yjs room. The lease is held only for the format/snapshot,
|
|
@@ -886,11 +940,24 @@ the currently selected root is compiled. Compile state, logs, retained PDF,
|
|
|
886
940
|
artifacts, outline, and SyncTeX are keyed by root, so collaborators working on
|
|
887
941
|
different roots do not replace each other's result or compile notification.
|
|
888
942
|
|
|
943
|
+
The supported direct-upgrade baseline is TexLite 0.2.0. Compilation artifacts
|
|
944
|
+
use the per-root v2 manifest introduced in that release:
|
|
945
|
+
`output/.texlite/targets/<root-hash>/latest.json` points to an immutable run
|
|
946
|
+
bundle under `output/.texlite/runs/<run-id>/`. Pre-0.2.0 project-wide v1
|
|
947
|
+
manifests, `.texlite/latest.pdf`, and direct `output/<root>.pdf` fallbacks are
|
|
948
|
+
not read; those generated results can be recreated by compiling. The optional
|
|
949
|
+
`generation` field remains backward-compatible with 0.2.0 manifests. This
|
|
950
|
+
output-format policy does not remove database migrations or source, comment,
|
|
951
|
+
and snapshot data compatibility.
|
|
952
|
+
|
|
889
953
|
Compilation follows this sequence:
|
|
890
954
|
|
|
891
955
|
1. Admission validates permissions/root selection and coalesces requests by
|
|
892
956
|
project, root, and a cheap source/settings generation.
|
|
893
|
-
|
|
957
|
+
The internal coordinator accepts only `generation`; `revision` remains the
|
|
958
|
+
content fingerprint on results, not an alternate admission-key parameter.
|
|
959
|
+
2. After coalescing, one project-queue reservation flushes the room,
|
|
960
|
+
revalidates permissions/root selection, and captures a source snapshot.
|
|
894
961
|
A short snapshot barrier prevents autosave from modifying the source tree
|
|
895
962
|
while the asynchronous copy and digest run. Edits that arrive during the
|
|
896
963
|
barrier remain in Yjs memory until the snapshot is complete, so the
|
|
@@ -915,9 +982,12 @@ The previous successful PDF remains visible during a new compile. The latest
|
|
|
915
982
|
published bundle is recovered after a restart and can be served before a cold
|
|
916
983
|
collaboration room is initialized. PDF requests support range responses for
|
|
917
984
|
PDF.js and expose the successful compile time and artifact size. The default
|
|
918
|
-
automatic loading policy uses a complete, cache-friendly response through
|
|
985
|
+
automatic loading policy uses a complete, cache-friendly response through 2 MB
|
|
919
986
|
and enables PDF.js byte-range loading above that threshold; deployments can
|
|
920
|
-
force either mode without changing project compiler settings. The
|
|
987
|
+
force either mode without changing project compiler settings. The threshold is
|
|
988
|
+
a size-based heuristic, not a universal latency optimum. Range mode allows
|
|
989
|
+
PDF.js to combine streaming and ranged requests; it does not guarantee that
|
|
990
|
+
only the visible page's bytes are downloaded. The output panel groups the PDF,
|
|
921
991
|
log, warnings, errors, generated artifacts, and recovery actions; clean-cache
|
|
922
992
|
and clean-artifact actions are for recovery rather than routine compilation.
|
|
923
993
|
The Vite build publishes the installed PDF.js version's predefined Adobe CMaps
|
|
@@ -938,6 +1008,45 @@ worker. Rendering and viewer assets remain lazy, in separate core/viewer chunks.
|
|
|
938
1008
|
TexLite retains its own toolbar and fit-width-relative zoom percentages. Resize
|
|
939
1009
|
and viewport reporting are coalesced with animation frames. Only effective width
|
|
940
1010
|
changes recalculate the fit scale, and each zoom applies the final scale once.
|
|
1011
|
+
The initial destination page is selected before scaling starts the native
|
|
1012
|
+
rendering queue, avoiding an unnecessary first-page draw when restoring a later
|
|
1013
|
+
page. A local compile uses its POST result rather than refetching the same run
|
|
1014
|
+
after a WebSocket completion; if that POST fails in transit, the shared state
|
|
1015
|
+
still provides a recovery lookup. Collaborators continue fetching completed
|
|
1016
|
+
runs normally. Post-compile artifact-list refreshes wait for the replacement
|
|
1017
|
+
PDF's first paint, or run when the PDF panel is hidden so output inspection
|
|
1018
|
+
never depends on a successful PDF render.
|
|
1019
|
+
|
|
1020
|
+
`CompilationResults` owns an immutable result snapshot for one workspace
|
|
1021
|
+
selection lifetime. Both the latest run and the retained successful PDF carry
|
|
1022
|
+
`projectId`, `mainFile`, and their own `runId`; a failed latest run does not
|
|
1023
|
+
change the successful PDF's identity. Switching project/root creates a new
|
|
1024
|
+
owner, including A-to-B-to-A navigation, and old responses cannot publish into
|
|
1025
|
+
that owner. Opening/reopening a workspace restores retained output; switching
|
|
1026
|
+
roots inside it starts empty until another compile is observed or requested.
|
|
1027
|
+
The initial metadata lookup settles before shared completion replays can start
|
|
1028
|
+
a recovery lookup. Local POSTs, shared completions, and bootstrap results all
|
|
1029
|
+
use the same result receiver, so acceptance, duplicate suppression, PDF
|
|
1030
|
+
replacement and reset rules are not maintained as separate run/URL refs.
|
|
1031
|
+
Saving finishes before the previous run is cleared or root-switch replay
|
|
1032
|
+
suppression is lifted; a failed save cannot replay an old result as a new
|
|
1033
|
+
compile success. Shared completions deferred or interrupted by cleanup are
|
|
1034
|
+
reconciled when cleanup ends. A successful cleanup response does not discard
|
|
1035
|
+
newer collaboration events received while its HTTP request was pending.
|
|
1036
|
+
The hook still owns request cancellation and output-panel lifetimes. Artifact
|
|
1037
|
+
lists/previews are checked against both the selection owner and the published
|
|
1038
|
+
PDF, and deferred bootstrap scans are cancelled when a compile begins. Pending
|
|
1039
|
+
local compiles are keyed by project and root; leaving a project or unmounting
|
|
1040
|
+
cancels their HTTP requests without letting late errors affect the next view.
|
|
1041
|
+
Leaving a project also retires its compiling/cancelling flags, independently
|
|
1042
|
+
of whether those requests have settled; root switches within that project
|
|
1043
|
+
keep pending tasks intact. Bootstrap active-state hints use a functional
|
|
1044
|
+
state update so queued React notifications cannot be overwritten. The same
|
|
1045
|
+
run cannot regress from running or completed to an earlier phase. A fresh
|
|
1046
|
+
lookup can discover a different run when no notification arrived during it;
|
|
1047
|
+
route preloads cannot replace existing notifications because their starting
|
|
1048
|
+
state is unknown. This ordering does not depend on browser clock timestamps.
|
|
1049
|
+
|
|
941
1050
|
Page numbers use separate elements, leaving PDF.js's loading pseudo-element intact.
|
|
942
1051
|
A replacement viewer is laid out and rendered without displaying it; the old PDF stays visible until
|
|
943
1052
|
a visible page in the replacement has painted successfully. Failed replacements
|
|
@@ -982,8 +1091,17 @@ to collaborators. The separate selection-history stream provides that
|
|
|
982
1091
|
author-attributed editing view and never changes snapshot retention or restore
|
|
983
1092
|
semantics.
|
|
984
1093
|
Its edit segments have their own `editHistory.maxStorageMB` hard payload cap
|
|
985
|
-
(
|
|
1094
|
+
(64 MB by default), so selection-history retention cannot consume the snapshot
|
|
986
1095
|
budget or affect recovery capacity.
|
|
1096
|
+
Internal edit batches are validated before any records are inserted. Invalid
|
|
1097
|
+
steps, spans, timestamps, or hash chains fail the batch and use the existing
|
|
1098
|
+
bounded retry/history-warning path; they are not silently dropped or assigned
|
|
1099
|
+
replacement timestamps. A damaged stored edit row stops selection-history
|
|
1100
|
+
reconstruction at that boundary instead of reconstructing a partial chain.
|
|
1101
|
+
Invalid snapshot changed-path metadata is reported as an error rather than an
|
|
1102
|
+
empty file list. File-backed root validation and icon lookup likewise preserve
|
|
1103
|
+
normal not-found results while allowing permission, I/O, and malformed generated
|
|
1104
|
+
resource errors to reach the server's error handler and logs.
|
|
987
1105
|
Autosaves across authors are coalesced within a fixed two-minute project window.
|
|
988
1106
|
A mixed-author snapshot has no single author attribution; selection edit history
|
|
989
1107
|
retains the individual contributions independently. File
|
|
@@ -1101,6 +1219,224 @@ receive implicit access to another user's projects; they see a project only
|
|
|
1101
1219
|
when they own it or it has been explicitly shared with them. The last active
|
|
1102
1220
|
administrator cannot be removed or disabled.
|
|
1103
1221
|
|
|
1222
|
+
## External agent terminals
|
|
1223
|
+
|
|
1224
|
+
Schema migration 10 adds an initially empty administrator agent allowlist, task records,
|
|
1225
|
+
and operation records. Tasks have independent UUIDs; project/user/agent is a
|
|
1226
|
+
grouping key, not a uniqueness constraint. One project admits only one active
|
|
1227
|
+
execution across all users, tasks and agents; different projects are independent.
|
|
1228
|
+
There are no limits on distinct tasks, elapsed runtime, provider quotas, or billing. Historical
|
|
1229
|
+
records do not retain live PTY handles. The application never automatically
|
|
1230
|
+
starts an agent in response to a compile failure or writing action.
|
|
1231
|
+
The workspace's Start task action creates and immediately launches a task; names
|
|
1232
|
+
are optional and default to six uniformly sampled characters from `A–Z`, `a–z`,
|
|
1233
|
+
`0–9` and `-`, independently of the task UUID.
|
|
1234
|
+
Creation is accepted into the UI before launching, so a launch failure retains
|
|
1235
|
+
the task and name for retry instead of creating duplicate conversations.
|
|
1236
|
+
The terminal heading can maximize the panel to the editor column's full height
|
|
1237
|
+
and restore its previous split. The source panel is also collapsible through
|
|
1238
|
+
the separator. Editor tabs/source and the live terminal stay mounted during
|
|
1239
|
+
maximization, preserving editor state, terminal output and the PTY connection;
|
|
1240
|
+
the collapsed editor is inert. Closing a maximized terminal resets the split
|
|
1241
|
+
so reopening does not leave the editor collapsed.
|
|
1242
|
+
|
|
1243
|
+
`AgentAdapter` in `src/server/agents/adapters/types.ts` defines feature discovery,
|
|
1244
|
+
native preparation, start, exact-context resume, native-session identification,
|
|
1245
|
+
and scoped cleanup. Codex, OpenCode, and Claude implement it separately;
|
|
1246
|
+
registration/discovery and session orchestration do not contain native command
|
|
1247
|
+
switches. PTY attachment, input ownership, process termination, task authorization,
|
|
1248
|
+
and retry state are shared service responsibilities. A task owns one native
|
|
1249
|
+
conversation, but launching a CLI process does not itself prove that a native
|
|
1250
|
+
conversation was created. A previously launched task without a saved session ID
|
|
1251
|
+
may launch again when its adapter verifies no conversation for that task. Discovery
|
|
1252
|
+
distinguishes found, empty and unknown states: missing storage, failed commands
|
|
1253
|
+
and ambiguous results never authorize a fresh conversation. OpenCode state is
|
|
1254
|
+
inspected through SQLite in read-only mode, preferring the V2 `session_v2`
|
|
1255
|
+
projection over a retained legacy `session` table. Older private layouts can use
|
|
1256
|
+
native JSON session listing. Detected `--standalone`
|
|
1257
|
+
support selects a private server owned by the task's process tree, avoiding
|
|
1258
|
+
host background-service dependencies for execution, discovery and cleanup.
|
|
1259
|
+
An existing session ID is verified before resuming because newer OpenCode
|
|
1260
|
+
versions may create an unknown `--session` ID instead of rejecting it.
|
|
1261
|
+
Once a session ID is saved, the service always resumes that
|
|
1262
|
+
exact ID and never clears it or silently replaces the conversation after a
|
|
1263
|
+
resume failure. The UI offers Continue only for an identified context. These
|
|
1264
|
+
decisions are server-owned, not a browser-supplied start/resume toggle. A separate
|
|
1265
|
+
conversation after an established one requires a new task UUID and state directory.
|
|
1266
|
+
|
|
1267
|
+
New OpenCode 2 tasks reuse the service account's native database and XDG
|
|
1268
|
+
data/state locations, so provider sign-ins (including GitHub Copilot) and token
|
|
1269
|
+
refreshes are shared with native terminals. TexLite asks `opencode debug paths db`
|
|
1270
|
+
for the actual database path, respecting `OPENCODE_DB` and native channel/platform
|
|
1271
|
+
defaults. Before launching, it registers a task-derived `ses_texlite…` ID and pins
|
|
1272
|
+
the database path in the task's `state/opencode-session.json`. Launches always
|
|
1273
|
+
pass that exact `--session` ID, and shared-state discovery never enumerates host
|
|
1274
|
+
conversations or chooses a newest/unique one. An ID already present before its
|
|
1275
|
+
ownership binding is created is not claimed. The native CLI creates the bound
|
|
1276
|
+
conversation when needed; an unused task may still have no persisted conversation.
|
|
1277
|
+
Existing private OpenCode conversations stay in their original database. Only
|
|
1278
|
+
verified empty private stores switch to the shared layout; their old files remain
|
|
1279
|
+
until task deletion.
|
|
1280
|
+
|
|
1281
|
+
TexLite lists and authorizes tasks exclusively from its own `agent_tasks` rows,
|
|
1282
|
+
not the OpenCode session catalog. Shared-state cleanup uses native
|
|
1283
|
+
`session delete <registered-id> --standalone` and verifies that exact ID is gone
|
|
1284
|
+
before removing the task record/files. It never removes the host database,
|
|
1285
|
+
credentials or unrelated native sessions. The native terminal's own history
|
|
1286
|
+
picker can expose shared host conversations; this is an accepted boundary for
|
|
1287
|
+
trusted writers, not additional tasks imported into TexLite.
|
|
1288
|
+
|
|
1289
|
+
All adapters inherit the service account's `XDG_CACHE_HOME`; when it is unset,
|
|
1290
|
+
the CLI chooses its own default. Shared caches can reuse model catalogs and
|
|
1291
|
+
installed dependencies across projects, tasks and native terminals.
|
|
1292
|
+
Codex and Claude keep task-specific `CODEX_HOME` and `CLAUDE_CONFIG_DIR` because
|
|
1293
|
+
these directories also contain conversations and other persistent state.
|
|
1294
|
+
TexLite does not selectively share undocumented files inside those native homes.
|
|
1295
|
+
Filesystem cleanup removes only the task's UUID directory, not the inherited host cache.
|
|
1296
|
+
These locations organize tasks; they do not sandbox agents running as the same
|
|
1297
|
+
service account.
|
|
1298
|
+
|
|
1299
|
+
The administrative screen is a separate lazy page, with agent settings and a
|
|
1300
|
+
paginated cross-project task catalog. Task listings use server-side pagination
|
|
1301
|
+
with 50 tasks per page across management pages and project terminals.
|
|
1302
|
+
Administrators can stop/delete tasks but
|
|
1303
|
+
cannot attach to another user's terminal. This metadata-specific authority does
|
|
1304
|
+
not change ordinary project visibility. Users can manage their own tasks, and
|
|
1305
|
+
execution/attachment additionally requires current project write
|
|
1306
|
+
access and membership in the administrator allowlist. Mutating requests reconcile active tasks after
|
|
1307
|
+
permission changes. Terminal input/output also validates access, and WebSocket
|
|
1308
|
+
authentication queries the actual session row rather than the HTTP request cache.
|
|
1309
|
+
|
|
1310
|
+
Tasks have no archive state; project archival only organizes project lists.
|
|
1311
|
+
Explicit termination releases the owned process
|
|
1312
|
+
group, including children, while retaining context. Explicit deletion also
|
|
1313
|
+
removes only task state, never project files. Cleanup failure preserves its record
|
|
1314
|
+
for retry; an unverified native operation is never represented as successful.
|
|
1315
|
+
Windows termination treats an OS-confirmed missing process as already stopped,
|
|
1316
|
+
including the race with natural exit; command failures and permission errors
|
|
1317
|
+
alone are not proof of termination. Graceful shutdown awaits every task's stop
|
|
1318
|
+
and final source synchronization before aggregating failures, so one failed
|
|
1319
|
+
task cannot make database shutdown overtake another task's final writes.
|
|
1320
|
+
Deleting a project/account stops affected executions and attempts scoped
|
|
1321
|
+
cleanup; orphaned tasks keep ownership labels and cleanup locators independently
|
|
1322
|
+
of the deleted rows, so administrators can resolve failures. Operation records
|
|
1323
|
+
retain project, agent, task, and actor identity after deletion, without transcripts.
|
|
1324
|
+
|
|
1325
|
+
New executions persist a task-owned `execution.json` lease with an independent
|
|
1326
|
+
execution UUID, platform, launcher PID and OS birth identity. A small Node
|
|
1327
|
+
launcher preserves the CLI's inherited TTY and waits for its verified identity
|
|
1328
|
+
to be committed before starting the CLI. It remains the identifiable process
|
|
1329
|
+
group leader after CLI exit; the normal stop path reaps the group before
|
|
1330
|
+
releasing the project. The CLI's exit code is relayed through an execution-scoped
|
|
1331
|
+
result file, not confused with the launcher's eventual termination code.
|
|
1332
|
+
|
|
1333
|
+
Startup recovery runs before requests are accepted. It verifies the UUID marker
|
|
1334
|
+
and birth identity (Linux boot ID/start ticks, macOS start time, Windows CIM
|
|
1335
|
+
creation time) before terminating any previous execution. Uncommitted launch
|
|
1336
|
+
permits are cancelled without starting their CLI. PID reuse never authorizes a
|
|
1337
|
+
kill. Unreadable identities, failed termination, or a live leaderless POSIX group
|
|
1338
|
+
retain the lease, task record, project claim, and an actionable recovery error;
|
|
1339
|
+
owners/admins can retry **End execution** or deletion after resolving the host
|
|
1340
|
+
problem. Project replacement cannot bypass the claim. Recovered source files
|
|
1341
|
+
are preserved and recorded in project snapshots; lost in-memory per-edit
|
|
1342
|
+
attribution cannot be reconstructed after a service crash.
|
|
1343
|
+
|
|
1344
|
+
These leases apply to executions started by this implementation. Pre-lease
|
|
1345
|
+
executions have no verifiable process locator: stop them before upgrading.
|
|
1346
|
+
Recovery does not discover or kill unrelated native CLI sessions or deliberately
|
|
1347
|
+
detached/escaped processes; Coding Agent terminals remain trusted host tools,
|
|
1348
|
+
not OS sandboxes. No database schema change is required.
|
|
1349
|
+
|
|
1350
|
+
Agents run directly in the project source directory. Task directories retain
|
|
1351
|
+
session bindings, private native state where used, and compilation context, not baseline/work copies. A synchronous
|
|
1352
|
+
project claim is acquired before asynchronous startup and released only after
|
|
1353
|
+
process-tree termination and final source synchronization. Source-tree exclusive
|
|
1354
|
+
operations end the writer before entering the project queue, preventing deadlocks
|
|
1355
|
+
with its final synchronization. This is a single-instance claim, not an OS lock.
|
|
1356
|
+
|
|
1357
|
+
An active source synchronizer polls directory metadata every 750 ms; only changed
|
|
1358
|
+
small files are read. Before a dirty collaborative file is saved, the same
|
|
1359
|
+
synchronizer checks its disk contents synchronously. Non-overlapping edits are
|
|
1360
|
+
three-way merged against the last known disk text. External text is applied as
|
|
1361
|
+
an attributed incremental Yjs transaction, preserving human edit segments and
|
|
1362
|
+
the exact anchor-update chain. Ordinary HTTP/browser writes advance the known
|
|
1363
|
+
disk state and are not attributed to the agent. Added/deleted/binary files update
|
|
1364
|
+
the tree and snapshots. Overlapping replacements preserve the editor draft and
|
|
1365
|
+
save the agent version under `.texlite-agent-conflicts/<task-id>/`, then stop the
|
|
1366
|
+
task with a visible warning. Symlinks and unreadable files stop synchronization
|
|
1367
|
+
instead of being followed. Polling ends with execution, not browser attachment.
|
|
1368
|
+
|
|
1369
|
+
Task context JSON and a compile log are exposed through `TEXLITE_PROJECT_CONTEXT`
|
|
1370
|
+
and `TEXLITE_COMPILE_LOG`; compile API completion refreshes this context. A CLI
|
|
1371
|
+
does not become sandboxed by running in a project, nor does this watcher impose
|
|
1372
|
+
filesystem barriers on arbitrary host processes. Compile snapshots retain their
|
|
1373
|
+
existing consistency checks; external edits should not be treated as OS-locked
|
|
1374
|
+
transactions across several files.
|
|
1375
|
+
|
|
1376
|
+
Before each launch, the service copies the fixed English
|
|
1377
|
+
`templates/agents/AGENTS.md` into the source root if `AGENTS.md` is absent. The
|
|
1378
|
+
exclusive-create copy never overwrites existing instructions. Creation uses
|
|
1379
|
+
the project write coordinator and updates collaboration, metadata and snapshots.
|
|
1380
|
+
The template scopes the agent to the current manuscript's LaTeX and academic
|
|
1381
|
+
writing, including bibliography work, compilation diagnostics and directly
|
|
1382
|
+
related supporting scripts. It directs the agent to refuse unrelated requests
|
|
1383
|
+
before using tools, handle mixed/ambiguous requests explicitly, and avoid
|
|
1384
|
+
fabricated references or results. The collaboration, source/output and compile
|
|
1385
|
+
context guidance remains deployment-independent; the template ships as a package
|
|
1386
|
+
runtime asset. Existing project instructions are not migrated automatically.
|
|
1387
|
+
The CLIs retain native instruction-file loading, without generated `CLAUDE.md`
|
|
1388
|
+
files or injected system-prompt flags. CLI versions/settings determine whether
|
|
1389
|
+
the file is loaded. Task scope is behavioral guidance for trusted users, not
|
|
1390
|
+
an enforced filesystem or execution boundary.
|
|
1391
|
+
|
|
1392
|
+
The browser mounts a terminal only for the visible task, and streams private
|
|
1393
|
+
terminal data over authenticated, origin-checked WebSockets with base-path and
|
|
1394
|
+
HTTPS support. One attachment owns input/resize; takeover is explicit. Server
|
|
1395
|
+
display replay is bounded, slow sockets disconnect without stopping the task,
|
|
1396
|
+
and full transcripts are not persisted by TexLite. Native CLI history can still
|
|
1397
|
+
exist in its task state. Raw terminal replay is a bounded recent stream, not a
|
|
1398
|
+
complete saved terminal screen; very long full-screen sessions may need a redraw.
|
|
1399
|
+
|
|
1400
|
+
Terminal appearance is separate from editor appearance. Its font, size and theme
|
|
1401
|
+
are browser-local preferences shared across projects and scoped to the
|
|
1402
|
+
deployment base path, without user/database or CLI configuration changes. The
|
|
1403
|
+
default is JetBrains Mono at 13 px with fixed 1.2 line spacing; existing web fonts and
|
|
1404
|
+
a system-monospace fallback are available. The original Catppuccin-inspired
|
|
1405
|
+
TexLite dark palette remains the default; Catppuccin Latte (light) and Gruvbox
|
|
1406
|
+
Dark are also bundled in `terminalTheme.ts`. Terminal color schemes and
|
|
1407
|
+
scrollbars follow the selected terminal palette, independently of the app/system
|
|
1408
|
+
theme. Existing preferences without a theme retain the original
|
|
1409
|
+
palette. xterm receives the selected palette at construction, before the CLI can query
|
|
1410
|
+
terminal colors. Padding, empty states and the font preview share the same
|
|
1411
|
+
palette; outer task controls still follow the application theme. Switching the
|
|
1412
|
+
app/system theme does not recolor, recreate or reconnect a running terminal.
|
|
1413
|
+
The palettes control xterm's default and ANSI colors; explicit true-color output
|
|
1414
|
+
and a coding agent's own application theme remain under that CLI's control.
|
|
1415
|
+
Latte uses xterm's minimum-contrast adjustment at 4.5 for readable terminal text;
|
|
1416
|
+
dark palettes retain xterm's default contrast behavior. Cursor, selection and
|
|
1417
|
+
preview accents are adapted for legibility on the pale Latte background.
|
|
1418
|
+
No Starship installation or host/agent configuration changes are required.
|
|
1419
|
+
Saving updates the current xterm palette immediately without reconnecting or
|
|
1420
|
+
clearing output. Theme-only changes do not reload fonts or resize the terminal;
|
|
1421
|
+
font changes fit its row/column geometry after loading. Font loading completes
|
|
1422
|
+
before measuring the selected font, with stale
|
|
1423
|
+
loads and unmounted terminals ignored; failed web fonts use the fallback stack.
|
|
1424
|
+
Previously stored terminal line-spacing choices are ignored and omitted on the
|
|
1425
|
+
next save; the editor's independent line-spacing setting is unchanged.
|
|
1426
|
+
Manual saves for editor/terminal/compiler settings, snapshot names and project
|
|
1427
|
+
tag edits show dismissible inline confirmation for two seconds. Unchanged
|
|
1428
|
+
compiler settings are reported separately; browser-storage failures show an
|
|
1429
|
+
error instead of claiming that local preferences were saved.
|
|
1430
|
+
|
|
1431
|
+
`node-pty` loads dynamically and is an optional production dependency. xterm.js
|
|
1432
|
+
and its fit addon are build dependencies behind a lazy terminal boundary. Missing
|
|
1433
|
+
PTY support does not block startup. Graceful shutdown stops managed executions;
|
|
1434
|
+
restart marks prior executions interrupted without trusting stored PIDs or
|
|
1435
|
+
automatically respawning them. Native state formats and resume capabilities vary
|
|
1436
|
+
by agent version; the deployed tools remain responsible for their own authentication.
|
|
1437
|
+
Working copies do not provide OS isolation. See `OPERATIONS.md` for the current
|
|
1438
|
+
adapter capability matrix and usage.
|
|
1439
|
+
|
|
1104
1440
|
## Known limitations and TODO
|
|
1105
1441
|
|
|
1106
1442
|
These items describe remaining engineering work rather than promises of a
|
package/NPM_TESTING.md
CHANGED
|
@@ -76,6 +76,9 @@ XDG_DATA_HOME="$TEST_ROOT/data" \
|
|
|
76
76
|
~~~
|
|
77
77
|
|
|
78
78
|
The `config` output should show the temporary configuration and data paths.
|
|
79
|
+
The generated JSON is intentionally minimal: unspecified settings are omitted
|
|
80
|
+
and resolved at runtime. The explicit test site name is saved; default history,
|
|
81
|
+
compiler, PDF and other settings should not be copied into the file.
|
|
79
82
|
`requirements` is safe before initialization: it checks only default host
|
|
80
83
|
commands on `PATH` and does not read the temporary configuration or data.
|
|
81
84
|
`doctor` verifies the configuration, database, administrator, and required
|
|
@@ -109,6 +112,26 @@ Ctrl+C to stop the server.
|
|
|
109
112
|
The package requires Node.js 24 or newer and the LaTeX engines enabled in the
|
|
110
113
|
selected configuration.
|
|
111
114
|
|
|
115
|
+
## Test optional external agent terminals
|
|
116
|
+
|
|
117
|
+
On the isolated test installation, sign in as an administrator and open
|
|
118
|
+
**Coding Agent CLI**. The default agent allowlist must be empty. Confirm that missing
|
|
119
|
+
commands are reported without blocking normal project editing, then allow only
|
|
120
|
+
the agents intentionally configured for this test.
|
|
121
|
+
|
|
122
|
+
In a writable project, open **Terminal**, create a task and explicitly start it.
|
|
123
|
+
Verify input, resize, browser reconnect, and end execution. Make a small direct
|
|
124
|
+
source edit and check live editor synchronization, attributed history and comment
|
|
125
|
+
anchors. Another user's/agent's task in the same project must fail to start until
|
|
126
|
+
the first execution ends. Delete the task and verify project files remain.
|
|
127
|
+
Never use a real model for an automated
|
|
128
|
+
package smoke test; the integration tests use deterministic fake agents.
|
|
129
|
+
|
|
130
|
+
For a second package installation, `npm install --omit=dev --omit=optional` must
|
|
131
|
+
still allow normal startup and login; the external-tools page should report
|
|
132
|
+
unavailable terminal support. Terminal resources must be present in the built
|
|
133
|
+
browser assets even though xterm packages are development dependencies.
|
|
134
|
+
|
|
112
135
|
## Test the PM2 lifecycle in isolation
|
|
113
136
|
|
|
114
137
|
Use both a private `PM2_HOME` and a test-only port. Every lifecycle command must
|