Repository navigation
v0.6.2
Fixes from a live test run against overleaf.com. No tool was added or removed; the server still
registers 31 tools. Two result shapes change: the comment tools return their own thread shape,
without email addresses, and sync_directory's failed entries carry the failed step's error
details. Several failures that used to reach Overleaf, or came back as REMOTE_ERROR, are now
refused before anything is sent; Changed lists every contract change.
Changed
- Comment tools return their own thread shape, and never an email address.
list_comments,
add_comment(itsthread), andreply_to_commentpassed Overleaf's thread objects through, so
every message carried the author'suser { first_name, last_name, email }, and a resolved thread
itsresolved_by_userwith an email. A thread is now{ id, status, messages, resolvedAt?, resolvedBy? }. Each message is{ id, author, content, timestamp }, whereauthoris{ id, displayName }, ornullwhen Overleaf names no user, andtimestampis an ISO string;
resolvedByis{ id, displayName }. Overleaf's other thread and message fields are no longer
returned. The three tools now declare anoutputSchemaand return the same object as
structuredContent. reply_to_commentreturns the created message. As its documentation said, the result is now
{ threadId, message, trackChangesActive, writeMode, recoveredAfterTimeout? }instead of the
whole thread. The new message is the one message that was not in the thread before the reply, from
this account, with this content; when the read-back cannot single it out, the call fails with
OUTCOME_UNKNOWNand is not resubmitted. A timed-out reply is likewise recovered only from a
message that is new since the request, so an identical earlier reply is no longer taken as proof.list_commentsmatchesauthoragainst names and ids only. It keeps threads with a message
whose author display name containsauthor, case-insensitive, or whose author id equals it. Email
addresses are no longer matched.sync_directoryfailures carry their error details. Eachfailedentry gains an optional
details, the failed step's own error details:{ destinationPath, action, errorCode, message, details? }. A refused OT update reportsdetails.reason, an HTTP failure itsstatus, a write
itsoutcomeorliveRevision, and a create that left its document behindcreated: true.create_filemarks an error raised after the document exists. Such an error keeps its code
anddetails, addsdetails.created: true, and is neverretryable.- A lost or closed project socket is a retryable
REMOTE_ERROR. It wasOUTCOME_UNKNOWN.
details.reasonisnot_connectedwhen nothing was sent, anddisconnectedwhen a read lost its
reply or the socket closed during the project join.OUTCOME_UNKNOWNis kept for a write that was
sent and may have applied. A write proved not applied after a lost socket isREMOTE_ERRORwith
details.outcome: "not_applied"andretryable: false.add_commentandset_comment_status
follow the same rule: an attachment or status change whose socket failed after it was sent, and
that stays absent through the recovery window, isREMOTE_ERRORwithdetails.outcome: "not_applied",details.threadId, andretryable: false, whereset_comment_statusreported
TIMEOUT; one that actually timed out still isTIMEOUT. A change Overleaf accepted but whose
requested state is never seen isOUTCOME_UNKNOWN, never not applied. - Characters outside the Basic Multilingual Plane are never sent to ShareJS documents. On a
ShareJS (legacy editor) document,write_file, and with itcreate_file,write_section, and
sync_directory, refuses text that adds such a character, an emoji for example, or an unpaired
surrogate, adds another copy of one the document already holds, or changes their order. The error
isINVALID_ARGUMENTwithdetails.line, the 1-based line of the first added one, and nothing is
sent; Overleaf would have replaced each one with U+FFFD. An edit that spans such a character the
document already holds is sent as several components that step around it, where it used to send
the character again and Overleaf turned it into U+FFFD. History-OT documents are unaffected. update_project_settingsnames what it stored before a failure. Its errors keep their code
andretryableand adddetails.applied, the input field names stored before the failure, and
details.failed, the input field name whose request failed. ArootFilePathwithout a.tex,
.ltx,.Rtex, or.Rnwextension isINVALID_ARGUMENTbefore any request.import_project_zipreads back the stored name, which needs theoverleaf-readeffect. Under
anOVERLEAF_ALLOWED_EFFECTSwithoutoverleaf-read, the call is refused withPOLICY_DENIED
before anything is uploaded. When the archive was imported but the read-back fails, an
AUTH_EXPIRED,POLICY_DENIED, orTIMEOUTfrom that read keeps its code anddetails; any
other failure,NOT_FOUNDandRATE_LIMITEDincluded, which for this tool mean nothing was
created, isREMOTE_ERROR. Every such error carries the new project's id indetails.projectId,
says the project was imported, and is neverretryable, since importing again would create a
second project.- Local file-system failures are typed by errno. In
upload_file,batch_upload, and
download_file, a missing file or folder isNOT_FOUND(details.errno: "ENOENT"), and any
other failure, such asEISDIRorEACCES, isINVALID_ARGUMENTwith the code in
details.errno. Both used to beREMOTE_ERROR. download_filechecks the local path before any request, and replaces a file atomically. A
folder, or a symbolic link to one, atlocalPathisINVALID_ARGUMENTwhateveroverwriteis, a
missing parent folder isNOT_FOUND, and a folder that cannot be written isINVALID_ARGUMENT
withdetails.errno, such asEACCES. Withoverwrite: truean existing file is replaced by
writing a temporary file in the same folder and renaming it into place, asdownload_project_zip
does, so a failed local write no longer leaves the old file truncated. The new file keeps the old
one's permission bits, and a symbolic link to a file is kept while the file it leads to is
replaced. The folder must now be writable even when the file exists: a writable file in a
read-only folder was overwritten in place before and is now refused before anything is fetched.manage_entityname collisions areINVALID_ARGUMENTbefore any request. They were
REMOTE_ERROR. This coverscreate_folderon an existing path, with or without a trailing slash,
renameto a name already in the folder, the entity's own included,moveinto a folder that
already holds that name, the entity's current folder included, and moving a folder into itself or
one of its subfolders. Names are compared exactly, as Overleaf compares them.- New
NOT_FOUNDrefusals.reply_to_commentwith athreadIdthat names no existing thread,
andset_comment_statusfor a thread not anchored infilePath, fail withNOT_FOUNDand
details.threadIdbefore anything is posted or changed.get_compile_logwithkind: "bibtex",
anddownload_compile_outputofoutput.blgoroutput.bbl, areNOT_FOUNDon a build in which
BibTeX did not run. These answers hold through abuildReftoo, and for a build with more than
100 outputs.compile_project'soutputFilesleaves outoutput.blgandoutput.bblon such a
build, so the listing matches what the output tools serve; the shape ofoutputFilesis
unchanged. monitor_project_historytrims a group that straddles the cursor. In an update group that
starts beforesinceVersion,projectOperationslists only operations withatVersionat or
aftersinceVersion. The group'sfromVersion,startedAt,paths, andlabelsstill describe
the whole group.- The tool descriptions follow the new behaviour. Those of
clone_project,
import_project_zip,update_project_settings,write_file,create_file,manage_entity,
download_file,sync_directory,get_section_content,write_section,compile_project,
get_compile_log,download_compile_output, the four comment tools, and
monitor_project_historyare updated, and the connect-time instructions (440 words) note that
legacy documents refuse added emoji.
Fixed
- Project actions and
stop_compilereport success again. Overleaf now acknowledges rename,
trash, restore, archive, unarchive, permanent deletion, and compile stop with a plain-textOK.
The server refused that body as not JSON and returnedPROTOCOL_UNSUPPORTEDalthough Overleaf
had applied the action. A bare status-text acknowledgement is now accepted wherever an empty
body already was; any other body that is not JSON is still refused. - Tracked writes are accepted on ShareJS documents.
writeMode: "tracked"oncreate_file,
write_file,write_section, andsync_directorysent the user ID as the track-changes id
seed, which Overleaf refuses as longer than 18 characters, so every tracked write failed with
REMOTE_ERROR. The server now sends an 18-character seed, as the web editor does; Overleaf
still attributes the change to the signed-in user. compile_projectbuilds therootFilePathit is given. overleaf.com built the project's
configured root document whateverrootFilePathnamed, while the result reported the requested
path. The compile request now names the file to build.- A project socket Overleaf closed is replaced, not reused. After Overleaf closed a project
socket, as it does after refusing an OT update, or a protocol error closed it, the dead socket
stayed cached: every later document or comment call in the process failed withOUTCOME_UNKNOWN,
andget_project_treereturned a frozen tree. The next call now opens a fresh socket. A recovery
waiting to drop that socket while another call still held it could wait indefinitely once the
replacement connection failed to open, and a second one on the same project always did. Freeing a
connection slot now wakes every waiting call, and each checks again whether it can proceed. - A Socket.IO event without arguments is accepted. Socket.IO 0.9 leaves out
argswhen Overleaf
sends an event with none, as in areconnectGracefullyduring a drain. That frame was rejected as
PROTOCOL_UNSUPPORTED, which closed the project socket and failed any call in flight on it. - A write cut off by a lost socket is classified, never resent. A write whose socket closed or
failed after the update was sent, or whose verification read then failed, was returned
unclassified. It is now observed like a timed-out write:recoveredAfterTimeout: truewhen the
intended text is live,REVISION_CONFLICTwithdetails.outcome: "unknown"for a third state, or
REMOTE_ERRORwithdetails.outcome: "not_applied"(retryable: false) when the original
revision stayed live through the recovery window.add_commentandset_comment_statusare now
classified the same way. When the socket failed after the update was sent, or the verification
read after an accepted update failed, they no longer return a retryableREMOTE_ERROR, which
could lead to a duplicate thread, or, foradd_comment, delete the new thread at once. They
observe the document instead:recoveredAfterTimeout: truewhen the comment or status is live,
OUTCOME_UNKNOWNwithdetails.threadIdwhen it cannot be settled or Overleaf accepted the
change but the requested state is never seen, andTIMEOUTorREMOTE_ERRORwith
details.outcome: "not_applied"when an unaccepted change stayed absent.add_commentremoves
its thread only in that last case. - A ShareJS line holding a real U+FFFD reads back exactly. Overleaf stores an emoji typed into
its legacy editor as U+FFFD, and such a line came back as latin1 mojibake.write_filethen
placed edits below that line at shifted offsets, corrupting the document, and a write that landed
exactly was reported asREVISION_CONFLICT. A leading byte order mark is also kept. create_filesays when it left a document behind. Creating the document and writing its
content are separate steps. When reading back or writing the content failed after the document was
created, the error did not say that the document now existed, possibly empty. It now keeps its
code and classification, addsdetails.created: true, and says to write the document with
write_filerather than create it again. Nothing is deleted on your behalf.sync_directoryresumes after a create that left its document behind. A create that failed
once its document existed, a refused tracked create for example, left aplanTokenthat did not
account for that document, so the documented resume failed withREMOTE_DRIFT. The token now
counts it while it is still empty or holds exactly the intended text, and the resumed sync writes
it through a revision-checked write. A leftover someone edited in between still stops the resume
withREMOTE_DRIFT. The failed entry's message told the agent to read the document with
read_fileand write it withwrite_file, advice meant forcreate_file; following it moved the
revision theplanTokenpins, so the resume failed withREMOTE_DRIFT. It now says not to create
or write the document by hand, but to resume with the returnedplanToken, or to runplan_sync
again if none came back.update_project_settingsno longer half-applies a change silently. Overleaf applies a
settings request field by field and stops at the first failure with a bare HTTP 500, so a call
that failed partway reported only the 500 while some settings were stored, and the same process
kept serving the old settings. Each setting is now sent in its own request, in the order Overleaf
applies them (compiler, imageName, spellCheckLanguage, then the root document); a failure names
the settings already stored, and no later setting is sent. The cached project snapshot is dropped
on failure too, so a followingget_project_treeshows what Overleaf stored.update_project_settingsrefuses a root Overleaf cannot compile before any request. A
rootFilePaththat does not end in.tex,.ltx,.Rtex, or.Rnw, in any case, such as a
.bibdocument, got an opaque HTTP 500 from Overleaf. It is nowINVALID_ARGUMENT.import_project_zipreturns the name Overleaf stored. Overleaf names an imported project
after the root document's\titlewhen there is one and adds a suffix such as(1)when the
account already has a project with that name, so the returned name could differ from the stored
one, andmanage_projectthen rejected it asconfirmName. The name is now read back after the
import. If that read fails, the error carries the newprojectIdindetailsand is never
retryable; see Changed for its code.compile_projectignores a BibTeX log left over from an earlier build. Overleaf's incremental
build directory keeps an earlier build'soutput.blgandoutput.bbland lists them again for
later builds in which BibTeX did not run. Their warnings, undefined citations, missing files, and
errors were reported as this build's, and a stale BibTeX error could make a clean build of another
root reportbuiltCleanly: false. Whenoutput.blgis listed,compile_projectnow reads the
build'soutput.aux(one extra request, made only then) and keeps the BibTeX log only when the
aux file holds a\bibdata, biblatex record, or\@inputline, or cannot be read in full. A
\citationline alone does not count, since\citewithout\bibliographywrites one and BibTeX
is then never run. The aux files an\@inputline names are not read, so a root that uses
\includekeeps the log. On a build in which BibTeX did not run,outputFilesleaves out
output.blgandoutput.bbl, andget_compile_logwithkind: "bibtex"and
download_compile_outputof either file answerNOT_FOUND, in this process or through
buildRef, also for a build with more than 100 outputs. A build that timed out or was terminated
is not checked, since itsoutput.auxmay be half written, so itsbuildRefcan still reach a
leftover.blg.- Section tools read
%as LaTeX does.get_sections,get_section_content, and
write_sectiontreated%after a\\line break as escaped, so a heading commented out after
\\%was parsed as a live section andwrite_sectioncut a body short at that line. Whether a
%is escaped now depends on the whole run of backslashes before it. A%inside averbatim,
verbatim*,lstlisting,minted, orcommentenvironment is literal text; one on the same
line as the environment's\end{...}used to hide every later heading, so awrite_sectionon
the section before it could delete the sections after it. Headings inside inline\verb,\verb*
(with any delimiter), or\lstinline(with a delimiter or braces) are no longer parsed, and%
inside them is text. In the same way, a heading name right after a\\line break, as in
text\\section{X}, is plain text to LaTeX. It was parsed as a live heading, so the section before
it ended between the two backslashes, and awrite_sectionon that section dropped the first
backslash and turned the text into a real\sectionheading. - Section offsets stay correct after an emoji in a comment. A character outside the Basic
Multilingual Plane inside a comment or a verbatim-like environment shifted every later section by
one, sowrite_sectionreplaced the wrong range. get_project_treereports each nested folder's own parent.parentFolderIdwas the project
root for every folder; it is now the folder that holds it.- Local file errors no longer pass the operating system's text through.
upload_fileand
download_filereturned local file-system failures asREMOTE_ERRORcarrying the operating
system's message and the resolved path. The new messages carry neither; see Changed for the codes.
batch_uploadgets the same codes throughupload_file. download_filechecks the local path before it fetches anything. An existing file without
overwrite: trueis refused with the sameINVALID_ARGUMENTas before, but no longer after a
wasted download. A folder, or a symbolic link to one, atlocalPathused to suggestoverwrite: true, which then failed after the download. A missing or unwritable parent folder is likewise
found before the fetch. The exclusive create still refuses a file that appears during the
download.manage_entityrefuses a name collision before any request. Acreate_folder,rename, or
movethat would put two entities with the same name in one folder, and moving a folder into
itself or one of its subfolders, failed at Overleaf asREMOTE_ERRORwith HTTP 400. A
create_folderpath with a trailing slash is checked the same way.monitor_project_historyno longer repeats project operations an earlier poll reported.
Overleaf can merge new changes into an update group between polls, so a group may start before
sinceVersion, and its earlier operations were reported again.list_commentsfilters by author name.authorcompared fields Overleaf does not send
(user.name) and the author's email, so a display name never matched while an email substring
did.reply_to_commentno longer posts a stray or duplicate reply. Overleaf creates any thread a
message is posted to, so a mistypedthreadIdsilently started a new, unanchored thread that no
tool can delete, and the call reported success. It also opened the project socket only after
posting, to readtrackChangesActive, so a project join that failed then, for example while
Overleaf was draining, returned a retryableREMOTE_ERRORfor a posted reply, and a retry posted
it twice. That state is now read before the reply is posted.set_comment_statuschecks the thread is infilePath. It resolved or reopened the thread by
id whatever documentfilePathnamed, and could report a thread anchored elsewhere, or nowhere,
as verified. On a history-OT document, the new status is now verified from the document snapshot,
also for a comment whose anchored text was deleted and for an open comment, whose snapshot entry
leavesresolvedout. A change that applied is no longer reported asOUTCOME_UNKNOWN, or after
a timeout as not applied.
Documentation
manage_entityresults includewriteMode, which is alwaysuntracked, since tree operations
are never tracked changes.- The tool reference says that a section's body runs to the next heading at the same or a higher
level, nested subsections included, and that the last one runs to the end of the file,
\end{document}included; thatclone_projectcopies the root document and compiler but not the
TeX Live image or spell-check language, which Overleaf resets to the account's defaults; that
update_project_settingsomitsspellCheckLanguagewhen spell checking is off; that
manage_projectreads the current name from Overleaf and checksconfirmNamebefore any change
is sent; and thatimport_project_zipusually has nodetails.overleafError, since overleaf.com
answers with a translated sentence rather than a code. - The safety model's error table and the protocol notes describe the socket, ShareJS, and local file
codes above, and the roadmap's count of tools still without anoutputSchemadrops to 12.