<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lattex.git, branch agent-cli</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/'/>
<entry>
<title>Add CLI build scripts, README docs, and tsconfig reference</title>
<updated>2026-09-13T04:05:47+00:00</updated>
<author>
<name>YurenHao0426</name>
<email>blackhao0426@gmail.com</email>
</author>
<published>2026-09-13T04:05:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=1e81ba361eed444442fa98b0770e7ed78dae864b'/>
<id>1e81ba361eed444442fa98b0770e7ed78dae864b</id>
<content type='text'>
- package.json: add build:cli, typecheck:cli, test:cli scripts
- README.md: add "Headless / Agent Mode (CLI)" section with full docs
- tsconfig.json: add tsconfig.cli.json reference

Co-Authored-By: Claude Opus 5 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- package.json: add build:cli, typecheck:cli, test:cli scripts
- README.md: add "Headless / Agent Mode (CLI)" section with full docs
- tsconfig.json: add tsconfig.cli.json reference

Co-Authored-By: Claude Opus 5 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add headless CLI for Overleaf project management (lattex-cli)</title>
<updated>2026-09-13T04:05:38+00:00</updated>
<author>
<name>YurenHao0426</name>
<email>blackhao0426@gmail.com</email>
</author>
<published>2026-09-13T04:05:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=f3b2fc01082e754f7dfe73caa4f0a4f207a2adfb'/>
<id>f3b2fc01082e754f7dfe73caa4f0a4f207a2adfb</id>
<content type='text'>
New src/cli/ module providing a headless CLI for AI agents to work with
Overleaf projects from a server with no display. Commands: auth, projects,
clone, pull, status, push, compile.

Key design decisions:
- Uses Node.js https module (no Electron dependency), same approach as the
  existing MCP server in src/mcp/lattex.mjs
- Reuses overleafProtocol.ts for Socket.IO v0.9 parsing (pure, no Electron)
- Separate esbuild bundle (out/cli/lattex-cli.mjs) — does not touch the
  Electron app build
- 64 tests for arg parsing, file tree walking, diff logic, and log parsing

Files:
- src/cli/main.ts — CLI entry point with all commands
- src/cli/args.ts — argument parser
- src/cli/overleafApi.ts — Overleaf API client using https + ws
- src/cli/fileTree.ts — project root folder walker
- src/cli/localState.ts — per-clone state (.lattex-cli.json) and auth storage
- src/cli/diff.ts — local vs remote diff logic
- src/cli/logParser.ts — LaTeX compile log parser
- src/cli/test.ts — unit tests
- tsconfig.cli.json — TypeScript config for CLI

Co-Authored-By: Claude Opus 5 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
New src/cli/ module providing a headless CLI for AI agents to work with
Overleaf projects from a server with no display. Commands: auth, projects,
clone, pull, status, push, compile.

Key design decisions:
- Uses Node.js https module (no Electron dependency), same approach as the
  existing MCP server in src/mcp/lattex.mjs
- Reuses overleafProtocol.ts for Socket.IO v0.9 parsing (pure, no Electron)
- Separate esbuild bundle (out/cli/lattex-cli.mjs) — does not touch the
  Electron app build
- 64 tests for arg parsing, file tree walking, diff logic, and log parsing

Files:
- src/cli/main.ts — CLI entry point with all commands
- src/cli/args.ts — argument parser
- src/cli/overleafApi.ts — Overleaf API client using https + ws
- src/cli/fileTree.ts — project root folder walker
- src/cli/localState.ts — per-clone state (.lattex-cli.json) and auth storage
- src/cli/diff.ts — local vs remote diff logic
- src/cli/logParser.ts — LaTeX compile log parser
- src/cli/test.ts — unit tests
- tsconfig.cli.json — TypeScript config for CLI

Co-Authored-By: Claude Opus 5 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix main-document switching end to end; stable project-independent MCP path</title>
<updated>2026-09-05T03:26:49+00:00</updated>
<author>
<name>haoyuren</name>
<email>13851610112@163.com</email>
</author>
<published>2026-09-05T03:26:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=34f22876ab9e15e9f14300a8c21cd7109800d1ab'/>
<id>34f22876ab9e15e9f14300a8c21cd7109800d1ab</id>
<content type='text'>
Main document: the app never called Overleaf's official settings endpoint,
so "Set as main document" only changed renderer state and agents had no way
to switch at all — compiles kept using the old root. Now:
- Right-click Set as main and the new set_main_file MCP tool both POST
  /project/:id/settings {rootDocId} (web parity, persists project-wide)
- Handle the rootDocUpdated broadcast: update the project snapshot, the
  renderer state, and rewrite CLAUDE.md/AGENTS.md — the guide's stale
  "Main file" line was teaching agents to compile the old root via
  main_file overrides
- Compile root resolution uses the sync bridge's live maps, so docs
  created mid-session resolve correctly (agent guide too)

MCP server location: Codex stores its MCP registration globally, and the
per-project path went stale when the project temp dir was cleaned up
("connection closed" on handshake). The bundled server now installs to
~/.lattex/lattex-mcp.mjs (project-independent, refreshed on connect; the
esbuild bundle since the raw source can't resolve node_modules from there)
and resolves the project at runtime: $LATTEX_PROJECT_DIR, cwd + ancestors,
legacy script location, then single live project in tmpdir. Register once,
works for every project.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Main document: the app never called Overleaf's official settings endpoint,
so "Set as main document" only changed renderer state and agents had no way
to switch at all — compiles kept using the old root. Now:
- Right-click Set as main and the new set_main_file MCP tool both POST
  /project/:id/settings {rootDocId} (web parity, persists project-wide)
- Handle the rootDocUpdated broadcast: update the project snapshot, the
  renderer state, and rewrite CLAUDE.md/AGENTS.md — the guide's stale
  "Main file" line was teaching agents to compile the old root via
  main_file overrides
- Compile root resolution uses the sync bridge's live maps, so docs
  created mid-session resolve correctly (agent guide too)

MCP server location: Codex stores its MCP registration globally, and the
per-project path went stale when the project temp dir was cleaned up
("connection closed" on handshake). The bundled server now installs to
~/.lattex/lattex-mcp.mjs (project-independent, refreshed on connect; the
esbuild bundle since the raw source can't resolve node_modules from there)
and resolves the project at runtime: $LATTEX_PROJECT_DIR, cwd + ancestors,
legacy script location, then single live project in tmpdir. Register once,
works for every project.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add in-app update check with one-click installer download</title>
<updated>2026-08-18T12:30:17+00:00</updated>
<author>
<name>haoyuren</name>
<email>13851610112@163.com</email>
</author>
<published>2026-08-18T12:30:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=1251d9208caadce626fd0706dfd34ba3e022fb2a'/>
<id>1251d9208caadce626fd0706dfd34ba3e022fb2a</id>
<content type='text'>
On launch the home page checks the latest GitHub release; when a newer
version exists a bottom-right card offers Download (streams the right
installer for the platform into ~/Downloads and opens it), Later, or
Skip this version (remembered). Unsigned app rules out silent
auto-update on macOS, so installation stays a manual replace.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On launch the home page checks the latest GitHub release; when a newer
version exists a bottom-right card offers Download (streams the right
installer for the platform into ~/Downloads and opens it), Later, or
Skip this version (remembered). Unsigned app rules out silent
auto-update on macOS, so installation stays a manual replace.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add browser-style project tabs: persistent home + one tab per project</title>
<updated>2026-08-18T12:24:40+00:00</updated>
<author>
<name>haoyuren</name>
<email>13851610112@163.com</email>
</author>
<published>2026-08-18T12:24:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=ec8214a4d111d92ce7c44de29d1706f241aa9514'/>
<id>ec8214a4d111d92ce7c44de29d1706f241aa9514</id>
<content type='text'>
The project list is now a persistent home tab; each opened project runs
in its own WebContentsView tab below a 38px tab strip (hidden when only
home is open). Background tabs stay fully live (sync, collab, terminals).

Main process: per-project singletons (socket, sync bridge, compilation
manager, MCP state, compile watcher) become per-tab ProjectSession
objects keyed by webContents.id; PTYs are scoped per webContents.
Hardened against races found in review: concurrent ot:connect dedupe,
teardown/reopen serialization on the shared sync dir, destroyed-window
guards on all bridge sends, real logout that closes project tabs.

Renderer: tabs strip in the home renderer (wt-* classes, distinct from
the editor's .tab-bar file tabs), project tabs boot from ?projectId= and
connect straight into the editor; Back closes the tab.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The project list is now a persistent home tab; each opened project runs
in its own WebContentsView tab below a 38px tab strip (hidden when only
home is open). Background tabs stay fully live (sync, collab, terminals).

Main process: per-project singletons (socket, sync bridge, compilation
manager, MCP state, compile watcher) become per-tab ProjectSession
objects keyed by webContents.id; PTYs are scoped per webContents.
Hardened against races found in review: concurrent ot:connect dedupe,
teardown/reopen serialization on the shared sync dir, destroyed-window
guards on all bridge sends, real logout that closes project tabs.

Renderer: tabs strip in the home renderer (wt-* classes, distinct from
the editor's .tab-bar file tabs), project tabs boot from ?projectId= and
connect straight into the editor; Back closes the tab.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Upload Windows installer via gh CLI instead of electron-builder publisher</title>
<updated>2026-07-30T03:12:40+00:00</updated>
<author>
<name>haoyuren</name>
<email>13851610112@163.com</email>
</author>
<published>2026-07-30T03:12:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=df3092328865949c088eed321e6675e3b7758c36'/>
<id>df3092328865949c088eed321e6675e3b7758c36</id>
<content type='text'>
The builder's GitHub publisher refuses to attach assets to releases
published more than two hours earlier.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The builder's GitHub publisher refuses to attach assets to releases
published more than two hours earlier.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Publish CI assets to the existing release, not a draft</title>
<updated>2026-07-30T03:08:01+00:00</updated>
<author>
<name>haoyuren</name>
<email>13851610112@163.com</email>
</author>
<published>2026-07-30T03:08:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=c784ead2f221609686a856fff0a827e51c50dc29'/>
<id>c784ead2f221609686a856fff0a827e51c50dc29</id>
<content type='text'>
Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Quote npmRebuild flag for pwsh in Windows CI</title>
<updated>2026-07-30T03:02:55+00:00</updated>
<author>
<name>haoyuren</name>
<email>13851610112@163.com</email>
</author>
<published>2026-07-30T03:02:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=2b094156b9a8c13b1e4ec117db3c9d10392be90c'/>
<id>2b094156b9a8c13b1e4ec117db3c9d10392be90c</id>
<content type='text'>
Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Windows CI: explicit verbose node-pty rebuild instead of install-app-deps</title>
<updated>2026-07-30T02:59:30+00:00</updated>
<author>
<name>haoyuren</name>
<email>13851610112@163.com</email>
</author>
<published>2026-07-30T02:59:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=d09de8c873d4d7092e94b354b3457ef496da5cef'/>
<id>d09de8c873d4d7092e94b354b3457ef496da5cef</id>
<content type='text'>
@electron/rebuild swallows child-process output and hung indefinitely at
"preparing node-pty" on both windows-latest and windows-2022 images.
Skip lifecycle scripts during npm ci and rebuild node-pty for Electron
directly via node-gyp (verbose, 10-minute step timeout), then package
with npmRebuild=false.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
@electron/rebuild swallows child-process output and hung indefinitely at
"preparing node-pty" on both windows-latest and windows-2022 images.
Skip lifecycle scripts during npm ci and rebuild node-pty for Electron
directly via node-gyp (verbose, 10-minute step timeout), then package
with npmRebuild=false.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Pin Windows CI to windows-2022 image</title>
<updated>2026-07-30T02:29:24+00:00</updated>
<author>
<name>haoyuren</name>
<email>13851610112@163.com</email>
</author>
<published>2026-07-30T02:29:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.blackhao.com/lattex.git/commit/?id=429d737f940a52ca4124f13f5911e6759d4b63bb'/>
<id>429d737f940a52ca4124f13f5911e6759d4b63bb</id>
<content type='text'>
windows-latest moved to Visual Studio 2026 in June 2026; node-gyp cannot
detect VS2026 yet (fails on v9, hangs on v11). Also add a 25-minute job
timeout and electron-builder debug output.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
windows-latest moved to Visual Studio 2026 in June 2026; node-gyp cannot
detect VS2026 yet (fails on v9, hangs on v11). Also add a 25-minute job
timeout and electron-builder debug output.

Co-Authored-By: Claude Fable 5 &lt;noreply@anthropic.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
