Desktop reference · Local API

Files and folders

The session’s folder: browse, read, search, preview and change its files; choose folders for new sessions. 26 operations of the TALOS Desktop local API.

Reference for TALOS Desktop 0.2.4 generated from the source of the release · released

The session’s folder: browse, read, search, preview and change its files; choose folders for new sessions. Paths are relative to /api/v1.

The turns whose file changes can be undone (disponibile: false where undoing is not available).

Before the first tool that writes in a turn, TALOS takes a snapshot of the project in a store of its own, outside the project and its Git. Dependencies, builds, caches, binaries and .env files are left out, as are files over 10 MB.

Path

sessionId
The session.

Answers The JSON envelope.

Errors4
CodeStatusMeaning
METHOD_NOT_ALLOWED 405 The address exists, but not with this method; the Allow header lists the methods it takes.
NOT_FOUND 404 Nothing answers at this address, or the resource it names does not exist.
PAYLOAD_LIMIT 413 The body is larger than the server accepts: shorten it, or put the text in a file and attach it.
QUERY_INVALID 400 The request is not valid: a query parameter or a body field is missing, unknown or malformed.

Any operation can also answer the common errors.

GET /sessions/{sessionId}/file-undo/{fileUndoId}

Section titled “GET /sessions/{sessionId}/file-undo/{fileUndoId}”

What undoing a turn would put back and what it would skip, with the differences.

Only a file whose content is still what TALOS wrote is put back; one changed afterwards by you or by a command is skipped, unless you include it. Writes outside the project (in Full access) cannot be undone, and are counted.

Path

sessionId
The session.
fileUndoId
The turn whose file changes to undo: its number, as GET …/file-undo lists it. redo (with POST and an empty body) puts back what the last undo took away.

Answers The JSON envelope.

Errors4
CodeStatusMeaning
METHOD_NOT_ALLOWED 405 The address exists, but not with this method; the Allow header lists the methods it takes.
NOT_FOUND 404 Nothing answers at this address, or the resource it names does not exist.
PAYLOAD_LIMIT 413 The body is larger than the server accepts: shorten it, or put the text in a file and attach it.
QUERY_INVALID 400 The request is not valid: a query parameter or a body field is missing, unknown or malformed.

Any operation can also answer the common errors.

POST /sessions/{sessionId}/file-undo/{fileUndoId}

Section titled “POST /sessions/{sessionId}/file-undo/{fileUndoId}”

Undo the file changes of a turn and of the turns after it; with redo, put back what the last undo took away.

Refused while a conversation is working in the same folder: undo when it has finished. A snapshot is taken first, so the undo can itself be undone.

Path

sessionId
The session.
fileUndoId
The turn whose file changes to undo: its number, as GET …/file-undo lists it. redo (with POST and an empty body) puts back what the last undo took away.

Body

include
The skipped files to put back anyway (paths relative to the project, up to 2,000). Not with redo, whose body must be empty.

Answers The JSON envelope.

Errors4
CodeStatusMeaning
METHOD_NOT_ALLOWED 405 The address exists, but not with this method; the Allow header lists the methods it takes.
NOT_FOUND 404 Nothing answers at this address, or the resource it names does not exist.
PAYLOAD_LIMIT 413 The body is larger than the server accepts: shorten it, or put the text in a file and attach it.
QUERY_INVALID 400 The request is not valid: a query parameter or a body field is missing, unknown or malformed.

Any operation can also answer the common errors.

List the project folders a session may open (ids and names, never absolute paths).

Answers The JSON envelope.

Errors1
CodeStatusMeaning
QUERY_INVALID 400 The request is not valid: a query parameter or a body field is missing, unknown or malformed.

Any operation can also answer the common errors.

Browse the folders of this computer, to choose the one a session works in.

Query

path
The folder to list (once at most); without it, the starting points.

Answers The JSON envelope.

Errors2
CodeStatusMeaning
QUERY_INVALID 400 The request is not valid: a query parameter or a body field is missing, unknown or malformed.
WORKSPACE_NOT_AVAILABLE 422 The folder is not available: check that it exists and that TALOS can work in it.

Any operation can also answer the common errors.

Folders used often, with their absolute paths, as suggestions for a session’s folder (from the history of sessions).

Answers The JSON envelope.

Errors1
CodeStatusMeaning
QUERY_INVALID 400 The request is not valid: a query parameter or a body field is missing, unknown or malformed.

Any operation can also answer the common errors.

A portrait of a folder before a session opens it: how many files, whether it is a repository root, its branch, unsaved changes and nested repositories (the scan has a declared ceiling).

Query

pathrequired
the folder (up to 4096 characters).

Answers The JSON envelope.

Errors1
CodeStatusMeaning
QUERY_INVALID 400 The request is not valid: a query parameter or a body field is missing, unknown or malformed.

Any operation can also answer the common errors.

Hand a folder to TALOS from outside the window (the launcher), to start a session on it; answers a launch id.

Used by the TALOS launcher; it carries its token in the x-talos-launcher-token header.

Body

percorsorequired
The folder, as an absolute path.

Headers

x-talos-launcher-token

Answers The JSON envelope.

Errors2
CodeStatusMeaning
AUTH_REQUIRED 401 This server accepts only the TALOS window that started it (or, for shutdown, the right token).
QUERY_INVALID 400 The request is not valid: a query parameter or a body field is missing, unknown or malformed.

Any operation can also answer the common errors.

Create a folder while choosing where a session works.

Body

parentPathrequired
The folder to create it in.
namerequired
The new folder’s name.

Answers The JSON envelope.

Errors2
CodeStatusMeaning
QUERY_INVALID 400 The request is not valid: a query parameter or a body field is missing, unknown or malformed.
WORKSPACE_NOT_AVAILABLE 422 The folder is not available: check that it exists and that TALOS can work in it.

Any operation can also answer the common errors.

Read a pending launch: the folder it carries, to confirm before the session starts.

Path

launchId
The launch.

Answers The JSON envelope.

Errors1
CodeStatusMeaning
QUERY_INVALID 400 The request is not valid: a query parameter or a body field is missing, unknown or malformed.

Any operation can also answer the common errors.

Preview the files of a project folder before a session opens it.

Path

projectId
The project folder.

Query

percorso
A subfolder, relative to the project (default: its root).

Answers The JSON envelope.

Errors1
CodeStatusMeaning
NOT_FOUND 404 Nothing answers at this address, or the resource it names does not exist.

Any operation can also answer the common errors.

The files of the session’s folder, one level at a time.

Path

sessionId
The session.

Query

percorso
A subfolder, relative to the session’s folder (default: its root).

Answers The JSON envelope.

Errors1
CodeStatusMeaning
NOT_FOUND 404 Nothing answers at this address, or the resource it names does not exist.

Any operation can also answer the common errors.

Open a file of the session’s folder, to show it in the window.

Path

sessionId
The session.

Query

percorsorequired
the file, relative to the session’s folder.

Answers The JSON envelope.

Errors1
CodeStatusMeaning
NOT_FOUND 404 Nothing answers at this address, or the resource it names does not exist.

Any operation can also answer the common errors.

Search the files of the session’s folder by name; the answer says when it was cut short, and which folders were skipped.

Path

sessionId
The session.

Query

qrequired
the text to look for.

Answers The JSON envelope.

Errors2
CodeStatusMeaning
NOT_FOUND 404 Nothing answers at this address, or the resource it names does not exist.
QUERY_INVALID 400 The request is not valid: a query parameter or a body field is missing, unknown or malformed.

Any operation can also answer the common errors.

Download a file of the session’s folder, as an attachment (sandboxed, never rendered by the app).

Path

sessionId
The session.

Query

percorsorequired
the file, relative to the session’s folder.

Answers The bytes themselves (a file or an image), not JSON.

Get an address to show an HTML page of the session’s folder, or a library item, inside the window.

The body is { percorso } or { voceId }. The server checks the file exists, is inside the session’s folder and is a page, and answers an address with a fresh pass (frames do not carry the cookie).

Path

sessionId
The session.

Body

versione
Not yet described.
voceId
Or a library item.
percorso
The page, relative to the session’s folder.

Answers The JSON envelope.

Errors2
CodeStatusMeaning
NOT_FOUND 404 Nothing answers at this address, or the resource it names does not exist.
QUERY_INVALID 400 The request is not valid: a query parameter or a body field is missing, unknown or malformed.

Any operation can also answer the common errors.

Serve a page, and the files next to it, by the pass POST …/pagine gave (no cookie needed, never outside the page’s folder).

The type comes from the extension, with nosniff; an unknown type is application/octet-stream. The query string is ignored (pages use it for caching).

Path

pageId
The page’s pass, from POST …/pagine.
path
The file, inside the page’s folder.

Answers The bytes themselves (a file or an image), not JSON.

Errors1
CodeStatusMeaning
NOT_FOUND 404 Nothing answers at this address, or the resource it names does not exist.

Any operation can also answer the common errors.

Preview a PDF of the session’s folder inline, sandboxed (the type is decided by the bytes: a file that does not start with %PDF- is 404).

Path

sessionId
The session.

Query

percorsorequired
the file, relative to the session’s folder.

Answers The bytes themselves (a file or an image), not JSON.

Errors1
CodeStatusMeaning
NOT_FOUND 404 Nothing answers at this address, or the resource it names does not exist.

Any operation can also answer the common errors.

The sandboxed guest page in which Word documents and presentations are rendered for preview (the window sends it the bytes).

Answers The bytes themselves (a file or an image), not JSON.

Rename a file or folder of the session’s folder.

Path

sessionId
The session.

Body

percorsorequired
The file or folder.
nuovoNomerequired
The new name.

Answers The JSON envelope.

Errors2
CodeStatusMeaning
NOT_FOUND 404 Nothing answers at this address, or the resource it names does not exist.
QUERY_INVALID 400 The request is not valid: a query parameter or a body field is missing, unknown or malformed.

Any operation can also answer the common errors.

Delete a file or folder of the session’s folder.

Path

sessionId
The session.

Body

percorsorequired
The file or folder.

Answers The JSON envelope.

Errors2
CodeStatusMeaning
NOT_FOUND 404 Nothing answers at this address, or the resource it names does not exist.
QUERY_INVALID 400 The request is not valid: a query parameter or a body field is missing, unknown or malformed.

Any operation can also answer the common errors.

Show a file in the file manager of this computer.

Path

sessionId
The session.

Body

percorsorequired
The file.

Answers The JSON envelope.

Errors2
CodeStatusMeaning
NOT_FOUND 404 Nothing answers at this address, or the resource it names does not exist.
QUERY_INVALID 400 The request is not valid: a query parameter or a body field is missing, unknown or malformed.

Any operation can also answer the common errors.

Open a folder in the file manager of this computer.

Path

sessionId
The session.

Body

percorsorequired
The folder; an empty string is the session’s folder itself.

Answers The JSON envelope.

Errors2
CodeStatusMeaning
NOT_FOUND 404 Nothing answers at this address, or the resource it names does not exist.
QUERY_INVALID 400 The request is not valid: a query parameter or a body field is missing, unknown or malformed.

Any operation can also answer the common errors.

Move a file or folder into another folder of the session’s folder.

Path

sessionId
The session.

Body

percorsorequired
What to move.
cartellaDestinazionerequired
Where to.

Answers The JSON envelope.

Errors2
CodeStatusMeaning
NOT_FOUND 404 Nothing answers at this address, or the resource it names does not exist.
QUERY_INVALID 400 The request is not valid: a query parameter or a body field is missing, unknown or malformed.

Any operation can also answer the common errors.

Duplicate a file or folder in the same place, named like a file manager does: “name (copia).ext”, then “(copia 2)” and so on.

Path

sessionId
The session.

Body

percorsorequired
What to copy.

Answers The JSON envelope.

Errors2
CodeStatusMeaning
NOT_FOUND 404 Nothing answers at this address, or the resource it names does not exist.
QUERY_INVALID 400 The request is not valid: a query parameter or a body field is missing, unknown or malformed.

Any operation can also answer the common errors.

Create a file or a folder.

Path

sessionId
The session.

Body

percorsoBaserequired
The folder to create it in.
nomerequired
Its name.
tiporequired
file or cartella (folder).

Answers The JSON envelope.

Errors2
CodeStatusMeaning
NOT_FOUND 404 Nothing answers at this address, or the resource it names does not exist.
QUERY_INVALID 400 The request is not valid: a query parameter or a body field is missing, unknown or malformed.

Any operation can also answer the common errors.

Type to search the guides.

    Ask the docs

    Ask in plain words. A small model finds the passage of the guides that answers it, on this device: the question never leaves it.

    all-MiniLM-L6-v2 (Apache-2.0) and the ONNX runtime, served by talos-code.com and kept in your browser’s cache. It finds passages; it does not write answers.

    Loading the model