2020-05-15 13:41:26 +03:00
|
|
|
---
|
|
|
|
layout: developer-doc
|
|
|
|
title: Enso Protocol Project Manager Message Specification
|
|
|
|
category: language-server
|
|
|
|
tags: [language-server, protocol, specification]
|
|
|
|
order: 3
|
|
|
|
---
|
|
|
|
|
|
|
|
# Enso Protocol Project Manager Message Specification
|
2020-07-21 15:59:40 +03:00
|
|
|
|
2020-05-15 13:41:26 +03:00
|
|
|
This document contains the specification of the Enso protocol messages that
|
|
|
|
pertain to the project manager component. Please familiarise yourself with the
|
|
|
|
[common](./protocol-common.md) features of the protocol before reading this
|
|
|
|
document.
|
|
|
|
|
|
|
|
For information on the design and architecture of the protocol, as well as its
|
2020-11-02 11:58:33 +03:00
|
|
|
transport formats, please look [here](./protocol-architecture.md).
|
2020-05-15 13:41:26 +03:00
|
|
|
|
|
|
|
<!-- MarkdownTOC levels="2,3" autolink="true" -->
|
|
|
|
|
|
|
|
- [Types](#types)
|
|
|
|
- [`ProjectMetadata`](#projectmetadata)
|
2020-11-02 11:58:33 +03:00
|
|
|
- [`MissingComponentAction`](#missingcomponentaction)
|
|
|
|
- [`ProgressUnit`](#progressunit)
|
|
|
|
- [`EngineVersion`](#engineversion)
|
2023-09-22 13:05:44 +03:00
|
|
|
- [`RunningState`](#runningstate)
|
2024-03-08 18:44:17 +03:00
|
|
|
- [`FileSystemEntry`](#filesystementry)
|
|
|
|
- [`Attributes`](#attributes)
|
|
|
|
- [`UTCDateTime`](#utcdatetime)
|
|
|
|
- [File System Management Operations](#file-system-management-operations)
|
|
|
|
- [List Directories](#list-directories)
|
|
|
|
- [Create Directory](#create-directory)
|
|
|
|
- [Delete Directory](#delete-directory)
|
|
|
|
- [Move File Or Directory](#move-file-or-directory)
|
2024-10-01 19:52:29 +03:00
|
|
|
- [Read File](#read-file)
|
2024-03-21 18:56:04 +03:00
|
|
|
- [Write to File](#write-to-file)
|
2020-05-15 13:41:26 +03:00
|
|
|
- [Project Management Operations](#project-management-operations)
|
|
|
|
- [`project/open`](#projectopen)
|
|
|
|
- [`project/close`](#projectclose)
|
2020-06-19 12:37:35 +03:00
|
|
|
- [`project/list`](#projectlist)
|
2020-05-15 13:41:26 +03:00
|
|
|
- [`project/create`](#projectcreate)
|
2020-07-01 16:55:50 +03:00
|
|
|
- [`project/rename`](#projectrename)
|
2020-05-15 13:41:26 +03:00
|
|
|
- [`project/delete`](#projectdelete)
|
|
|
|
- [`project/listSample`](#projectlistsample)
|
2023-09-22 13:05:44 +03:00
|
|
|
- [`project/status`](#projectstatus)
|
2024-07-02 14:39:43 +03:00
|
|
|
- [`project/duplicate`](#projectduplicate)
|
2020-11-02 11:58:33 +03:00
|
|
|
- [Action Progress Reporting](#action-progress-reporting)
|
|
|
|
- [`task/started`](#taskstarted)
|
|
|
|
- [`task/progress-update`](#taskprogress-update)
|
|
|
|
- [`task/finished`](#taskfinished)
|
2021-05-27 18:13:52 +03:00
|
|
|
- [Runtime Version Management](#runtime-version-management)
|
2020-11-02 11:58:33 +03:00
|
|
|
- [`engine/list-installed`](#enginelist-installed)
|
|
|
|
- [`engine/list-available`](#enginelist-available)
|
|
|
|
- [`engine/install`](#engineinstall)
|
|
|
|
- [`engine/uninstall`](#engineuninstall)
|
|
|
|
- [Configuration Management](#configuration-management)
|
|
|
|
- [`global-config/get`](#global-configget)
|
|
|
|
- [`global-config/set`](#global-configset)
|
|
|
|
- [`global-config/delete`](#global-configdelete)
|
|
|
|
- [Logging Service](#logging-service)
|
|
|
|
- [`logging-service/get-endpoint`](#logging-serviceget-endpoint)
|
2020-05-15 13:41:26 +03:00
|
|
|
- [Language Server Management](#language-server-management)
|
2021-05-27 18:13:52 +03:00
|
|
|
- [Errors](#errors)
|
2020-11-02 11:58:33 +03:00
|
|
|
- [`MissingComponentError`](#missingcomponenterror)
|
|
|
|
- [`BrokenComponentError`](#brokencomponenterror)
|
|
|
|
- [`ProjectManagerUpgradeRequired`](#projectmanagerupgraderequired)
|
|
|
|
- [`ComponentInstallationError`](#componentinstallationerror)
|
|
|
|
- [`ComponentUninstallationError`](#componentuninstallationerror)
|
|
|
|
- [`ComponentRepositoryUnavailable`](#componentrepositoryunavailable)
|
2020-05-15 13:41:26 +03:00
|
|
|
- [`ProjectNameValidationError`](#projectnamevalidationerror)
|
|
|
|
- [`ProjectDataStoreError`](#projectdatastoreerror)
|
|
|
|
- [`ProjectExistsError`](#projectexistserror)
|
|
|
|
- [`ProjectNotFoundError`](#projectnotfounderror)
|
|
|
|
- [`ProjectOpenError`](#projectopenerror)
|
|
|
|
- [`ProjectNotOpenError`](#projectnotopenerror)
|
|
|
|
- [`ProjectOpenByOtherPeersError`](#projectopenbyotherpeerserror)
|
|
|
|
- [`CannotRemoveOpenProjectError`](#cannotremoveopenprojecterror)
|
2020-11-02 11:58:33 +03:00
|
|
|
- [`ProjectCloseError`](#projectcloseerror)
|
|
|
|
- [`LanguageServerError`](#languageservererror)
|
|
|
|
- [`GlobalConfigurationAccessError`](#globalconfigurationaccesserror)
|
2020-12-02 18:56:47 +03:00
|
|
|
- [`ProjectCreateError`](#projectcreateerror)
|
2020-11-02 11:58:33 +03:00
|
|
|
- [`LoggingServiceUnavailable`](#loggingserviceunavailable)
|
2020-05-15 13:41:26 +03:00
|
|
|
|
|
|
|
<!-- /MarkdownTOC -->
|
|
|
|
|
|
|
|
## Types
|
2020-07-21 15:59:40 +03:00
|
|
|
|
2020-05-15 13:41:26 +03:00
|
|
|
There are a number of types that are used only within the project server's
|
|
|
|
protocol messages. These are specified here.
|
|
|
|
|
|
|
|
### `ProjectMetadata`
|
2020-07-21 15:59:40 +03:00
|
|
|
|
2020-05-15 13:41:26 +03:00
|
|
|
This type represents information about a project.
|
|
|
|
|
|
|
|
#### Format
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
interface ProjectMetadata {
|
2021-02-09 13:55:32 +03:00
|
|
|
/**
|
|
|
|
* The name of the project.
|
|
|
|
*/
|
2020-05-15 13:41:26 +03:00
|
|
|
name: String;
|
2021-02-09 13:55:32 +03:00
|
|
|
|
2021-06-25 14:09:40 +03:00
|
|
|
/**
|
|
|
|
* The namespace of the project.
|
|
|
|
*/
|
|
|
|
namespace: String;
|
|
|
|
|
2021-02-09 13:55:32 +03:00
|
|
|
/**
|
|
|
|
* The project id.
|
|
|
|
*/
|
2020-05-15 13:41:26 +03:00
|
|
|
id: UUID;
|
2021-02-09 13:55:32 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Enso Engine version to use for the project, represented by a semver version
|
|
|
|
* string.
|
2021-07-14 12:49:57 +03:00
|
|
|
*
|
|
|
|
* If the edition associated with the project could not be resolved, the
|
|
|
|
* engine version may be missing.
|
2021-02-09 13:55:32 +03:00
|
|
|
*/
|
2021-07-14 12:49:57 +03:00
|
|
|
engineVersion?: String;
|
2021-02-09 13:55:32 +03:00
|
|
|
|
2023-05-22 16:40:10 +03:00
|
|
|
/**
|
|
|
|
* The project creation time.
|
|
|
|
*/
|
|
|
|
created: UTCDateTime;
|
|
|
|
|
2021-02-09 13:55:32 +03:00
|
|
|
/**
|
|
|
|
* The last opened datetime.
|
|
|
|
*/
|
|
|
|
lastOpened?: UTCDateTime;
|
2020-05-15 13:41:26 +03:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2020-11-02 11:58:33 +03:00
|
|
|
### `MissingComponentAction`
|
|
|
|
|
|
|
|
This type specifies what action should be taken if a component required to
|
|
|
|
complete an operation is missing.
|
|
|
|
|
|
|
|
- `Fail` will make the operation fail if any components are missing.
|
|
|
|
- `Install` will try to install any missing components, unless they are marked
|
|
|
|
as broken.
|
|
|
|
- `ForceInstallBroken` will try to install all missing components, even if some
|
|
|
|
of them are marked as broken.
|
|
|
|
|
|
|
|
#### Format
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
type MissingComponentAction = Fail | Install | ForceInstallBroken;
|
|
|
|
```
|
|
|
|
|
|
|
|
### `ProgressUnit`
|
|
|
|
|
|
|
|
This type specifies the unit of progress updates related to a task.
|
|
|
|
|
|
|
|
#### Format
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
type ProgressUnit = Bytes | Other;
|
|
|
|
```
|
|
|
|
|
|
|
|
### `EngineVersion`
|
|
|
|
|
|
|
|
This type represents an installed or available engine version.
|
|
|
|
|
|
|
|
#### Format
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
interface EngineVersion {
|
|
|
|
/** Semver string of engine version. */
|
|
|
|
version: String;
|
|
|
|
|
|
|
|
/** Specifies if that version is marked as broken. */
|
|
|
|
markedAsBroken: bool;
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2023-09-22 13:05:44 +03:00
|
|
|
### `RunningState`
|
|
|
|
|
|
|
|
This type represents information about a state of the (potentially) running
|
|
|
|
project.
|
|
|
|
|
|
|
|
#### Format
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
interface RunningStatus {
|
|
|
|
/**
|
|
|
|
* If true, the project is open and (still) accepting new connections.
|
|
|
|
* False, if the project is currently shutdown.
|
|
|
|
*/
|
|
|
|
open: bool;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* If true, the project is currently running but in a soft shutdown mode.
|
|
|
|
* False, if the project is either not running or it is not shutting down.
|
|
|
|
*/
|
|
|
|
shuttingDown: bool;
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2024-03-08 18:44:17 +03:00
|
|
|
### `FileSystemEntry`
|
|
|
|
|
|
|
|
A directory entry in the fileystem operations.
|
|
|
|
|
|
|
|
#### Format
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
type FileSystemEntry = FileEntry | DirectoryEntry | ProjectEntry;
|
|
|
|
|
|
|
|
interface FileEntry {
|
|
|
|
path: string;
|
|
|
|
attributes: Attributes;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface DirectoryEntry {
|
|
|
|
path: string;
|
|
|
|
attributes: Attributes;
|
|
|
|
}
|
|
|
|
|
|
|
|
interface ProjectEntry {
|
|
|
|
path: string;
|
|
|
|
attributes: Attributes;
|
|
|
|
metadata: ProjectMetadata;
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### `Attributes`
|
|
|
|
|
|
|
|
Basic attributes of a filesystem entry.
|
|
|
|
|
|
|
|
#### Format
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
interface Attributes {
|
|
|
|
creationTime: UTCDateTime;
|
|
|
|
lastAccessTime: UTCDateTime;
|
|
|
|
lastModifiedTime: UTCDateTime;
|
|
|
|
byteSize: number;
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### `UTCDateTime`
|
|
|
|
|
|
|
|
Time in UTC time zone represented as ISO-8601 string.
|
|
|
|
|
|
|
|
#### Format
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
type UTCDateTime = string;
|
|
|
|
```
|
|
|
|
|
|
|
|
## File System Management Operations
|
|
|
|
|
|
|
|
The project-manager binary provides Cli interface to do basic filesystem
|
|
|
|
operations.
|
|
|
|
|
|
|
|
### List Directories
|
|
|
|
|
|
|
|
List directory returning information about filesystem entries together with the
|
|
|
|
project metadata if the listed directory contains a project.
|
|
|
|
|
|
|
|
#### Parameters
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
project-manager --filesystem-list {path}
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Result
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
{
|
|
|
|
entries: FileSystemEntry[];
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Errors
|
|
|
|
|
|
|
|
- [`ProjectDataStoreError`](#projectdatastoreerror) to signal problems with
|
|
|
|
underlying data store.
|
|
|
|
|
|
|
|
### Create Directory
|
|
|
|
|
|
|
|
Create directory with the specified path.
|
|
|
|
|
|
|
|
#### Parameters
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
project-manager --filesystem-create-directory {path}
|
|
|
|
```
|
|
|
|
|
|
|
|
### Result
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
null;
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Errors
|
|
|
|
|
|
|
|
- [`ProjectDataStoreError`](#projectdatastoreerror) to signal problems with
|
|
|
|
underlying data store.
|
|
|
|
|
|
|
|
### Delete Directory
|
|
|
|
|
|
|
|
Deletes directory with the specified path.
|
|
|
|
|
|
|
|
#### Parameters
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
project-manager --filesystem-delete-directory {path}
|
|
|
|
```
|
|
|
|
|
|
|
|
### Result
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
null;
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Errors
|
|
|
|
|
|
|
|
- [`ProjectDataStoreError`](#projectdatastoreerror) to signal problems with
|
|
|
|
underlying data store.
|
|
|
|
|
|
|
|
### Move File Or Directory
|
|
|
|
|
|
|
|
Moves file or directory from target path to the destination path.
|
|
|
|
|
|
|
|
#### Parameters
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
project-manager --filesystem-move-from {path} --filesystem-move-to {path}
|
|
|
|
```
|
|
|
|
|
|
|
|
### Result
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
null;
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Errors
|
|
|
|
|
2024-10-01 19:52:29 +03:00
|
|
|
- [`ProjectDataStoreError`](#projectdatastoreerror) to signal problems with
|
|
|
|
underlying data store.
|
|
|
|
|
|
|
|
### Read File
|
|
|
|
|
|
|
|
Read the provided path and return the contents to stdout.
|
|
|
|
|
|
|
|
#### Parameters
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
project-manager --filesystem-read-path {path}
|
|
|
|
```
|
|
|
|
|
|
|
|
### Result
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
null;
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Errors
|
|
|
|
|
2024-03-21 18:56:04 +03:00
|
|
|
- [`ProjectDataStoreError`](#projectdatastoreerror) to signal problems with
|
|
|
|
underlying data store.
|
|
|
|
|
|
|
|
### Write to File
|
|
|
|
|
|
|
|
Writes bytes from stdin to the provided path.
|
|
|
|
|
|
|
|
#### Parameters
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
echo 'Hello World!' | project-manager --filesystem-write-path {path}
|
|
|
|
```
|
|
|
|
|
|
|
|
### Result
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
null;
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Errors
|
|
|
|
|
2024-03-08 18:44:17 +03:00
|
|
|
- [`ProjectDataStoreError`](#projectdatastoreerror) to signal problems with
|
|
|
|
underlying data store.
|
|
|
|
|
2020-05-15 13:41:26 +03:00
|
|
|
## Project Management Operations
|
2020-07-21 15:59:40 +03:00
|
|
|
|
2020-05-15 13:41:26 +03:00
|
|
|
The primary responsibility of the project managers is to allow users to manage
|
|
|
|
their projects.
|
|
|
|
|
|
|
|
### `project/open`
|
2020-07-21 15:59:40 +03:00
|
|
|
|
2020-05-15 13:41:26 +03:00
|
|
|
This message requests that the project manager open a specified project. This
|
|
|
|
operation also includes spawning an instance of the language server open on the
|
|
|
|
specified project.
|
|
|
|
|
2020-11-02 11:58:33 +03:00
|
|
|
To open a project, an engine version that is specified in project settings needs
|
2020-12-02 18:56:47 +03:00
|
|
|
to be installed. If `missingComponentAction` is set to `Install` or
|
|
|
|
`ForceInstallBroken`, this action will install any missing components,
|
2020-11-02 11:58:33 +03:00
|
|
|
otherwise, an error will be reported if a component is missing. A typical usage
|
|
|
|
scenario may consist of first trying to open the project without installing
|
|
|
|
missing components. If that fails with the `MissingComponentError`, the client
|
|
|
|
can ask the user if they want to install the missing components and re-attempt
|
|
|
|
the action.
|
|
|
|
|
2020-05-15 13:41:26 +03:00
|
|
|
- **Type:** Request
|
|
|
|
- **Direction:** Client -> Server
|
|
|
|
- **Connection:** Protocol
|
|
|
|
- **Visibility:** Public
|
|
|
|
|
|
|
|
#### Parameters
|
|
|
|
|
|
|
|
```typescript
|
2021-05-27 18:13:52 +03:00
|
|
|
{
|
2020-05-15 13:41:26 +03:00
|
|
|
projectId: UUID;
|
2020-11-02 11:58:33 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Specifies how to handle missing components.
|
|
|
|
*
|
2020-12-02 18:56:47 +03:00
|
|
|
* If not provided, defaults to `Fail`.
|
2020-11-02 11:58:33 +03:00
|
|
|
*/
|
|
|
|
missingComponentAction?: MissingComponentAction;
|
2024-02-12 12:46:40 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Custom directory with the user projects.
|
|
|
|
*/
|
|
|
|
projectsDirectory?: string;
|
2020-05-15 13:41:26 +03:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Result
|
|
|
|
|
|
|
|
```typescript
|
2021-05-27 18:13:52 +03:00
|
|
|
{
|
2021-02-09 13:55:32 +03:00
|
|
|
/**
|
|
|
|
* The version of the started language server represented by a semver version
|
|
|
|
* string.
|
|
|
|
*/
|
|
|
|
engineVersion: String;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The endpoint used for JSON-RPC protocol.
|
|
|
|
*/
|
2020-05-15 13:41:26 +03:00
|
|
|
languageServerJsonAddress: IPWithSocket;
|
2021-02-09 13:55:32 +03:00
|
|
|
|
2023-10-12 01:03:34 +03:00
|
|
|
/**
|
|
|
|
* The optional endpoint used for secure JSON-RPC protocol.
|
|
|
|
*/
|
|
|
|
languageServerSecureJsonAddress?: IPWithSocket;
|
|
|
|
|
2021-02-09 13:55:32 +03:00
|
|
|
/**
|
|
|
|
* The endpoint used for binary protocol.
|
|
|
|
*/
|
2020-05-15 13:41:26 +03:00
|
|
|
languageServerBinaryAddress: IPWithSocket;
|
2021-05-27 18:13:52 +03:00
|
|
|
|
2023-10-12 01:03:34 +03:00
|
|
|
/**
|
|
|
|
* The optional endpoint used for secure binary protocol.
|
|
|
|
*/
|
|
|
|
languageServerSecureBinaryAddress?: IPWithSocket;
|
|
|
|
|
2021-05-27 18:13:52 +03:00
|
|
|
// The name of the project as it is opened.
|
|
|
|
projectName: String;
|
2021-06-25 14:09:40 +03:00
|
|
|
|
2023-07-31 20:47:28 +03:00
|
|
|
// The normalized name of the project.
|
|
|
|
projectNormalizedName: String;
|
2023-07-28 16:44:39 +03:00
|
|
|
|
2021-06-25 14:09:40 +03:00
|
|
|
// The namespace of the project.
|
|
|
|
projectNamespace: String;
|
2020-05-15 13:41:26 +03:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Errors
|
2020-07-21 15:59:40 +03:00
|
|
|
|
2020-05-15 13:41:26 +03:00
|
|
|
- [`ProjectNotFoundError`](#projectnotfounderror) to signal that the project
|
|
|
|
doesn't exist.
|
|
|
|
- [`ProjectDataStoreError`](#projectdatastoreerror) to signal problems with
|
|
|
|
underlying data store.
|
|
|
|
- [`ProjectOpenError`](#projectopenerror) to signal failures during server boot.
|
2020-11-02 11:58:33 +03:00
|
|
|
- [`MissingComponentError`](#missingcomponenterror) to signal that the component
|
|
|
|
required to open the project was missing (only in case
|
|
|
|
`missingComponentAction` was set to `fail`).
|
|
|
|
- [`BrokenComponentError`](#brokencomponenterror) to signal that the component
|
|
|
|
required to open the project was being installed but is marked as broken (only
|
|
|
|
in case `missingComponentAction` was set to `install`).
|
|
|
|
- [`ComponentInstallationError`](#componentinstallationerror) to signal that the
|
|
|
|
installation of a missing component has failed.
|
|
|
|
- [`ProjectManagerUpgradeRequired`](#projectmanagerupgraderequired) to signal
|
|
|
|
that the requested engine version requires a more recent project manager, so
|
|
|
|
an upgrade has to be performed before continuing.
|
2020-05-15 13:41:26 +03:00
|
|
|
|
|
|
|
### `project/close`
|
2020-07-21 15:59:40 +03:00
|
|
|
|
2020-05-15 13:41:26 +03:00
|
|
|
This message requests that the project manager close a specified project. This
|
|
|
|
operation includes shutting down the language server gracefully so that it can
|
|
|
|
persist state to disk as needed.
|
|
|
|
|
|
|
|
- **Type:** Request
|
|
|
|
- **Direction:** Client -> Server
|
|
|
|
- **Connection:** Protocol
|
|
|
|
- **Visibility:** Public
|
|
|
|
|
|
|
|
#### Parameters
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
interface ProjectCloseRequest {
|
|
|
|
projectId: UUID;
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Result
|
|
|
|
|
|
|
|
```typescript
|
2020-07-21 15:59:40 +03:00
|
|
|
{
|
|
|
|
}
|
2020-05-15 13:41:26 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
#### Errors
|
2020-07-21 15:59:40 +03:00
|
|
|
|
2020-05-15 13:41:26 +03:00
|
|
|
- [`ProjectNotFoundError`](#projectnotfounderror) to signal that the project
|
|
|
|
doesn't exist.
|
|
|
|
- [`ProjectDataStoreError`](#projectdatastoreerror) to signal problems with
|
|
|
|
underlying data store.
|
|
|
|
- [`ProjectCloseError`](#projectcloseerror) to signal failures that occurred
|
|
|
|
during language server stoppage.
|
|
|
|
- [`ProjectNotOpenError`](#projectnotopenerror) to signal cannot close a project
|
|
|
|
that is not open.
|
2020-07-21 15:59:40 +03:00
|
|
|
- [`ProjectOpenByOtherPeersError`](#projectopenbyotherpeerserror) to signal that
|
|
|
|
cannot close a project that is open by other clients.
|
2020-05-15 13:41:26 +03:00
|
|
|
|
2020-06-19 12:37:35 +03:00
|
|
|
### `project/list`
|
2020-07-21 15:59:40 +03:00
|
|
|
|
|
|
|
This message requests that the project manager lists all user's projects. The
|
2020-06-19 12:37:35 +03:00
|
|
|
list of projects is sorted by the open time.
|
2020-05-15 13:41:26 +03:00
|
|
|
|
|
|
|
- **Type:** Request
|
|
|
|
- **Direction:** Client -> Server
|
|
|
|
- **Connection:** Protocol
|
|
|
|
- **Visibility:** Public
|
|
|
|
|
|
|
|
#### Parameters
|
|
|
|
|
|
|
|
```typescript
|
2020-06-19 12:37:35 +03:00
|
|
|
interface ProjectListRequest {
|
|
|
|
numberOfProjects?: Int;
|
2020-05-15 13:41:26 +03:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Result
|
|
|
|
|
|
|
|
```typescript
|
2020-06-19 12:37:35 +03:00
|
|
|
interface ProjectListResponse {
|
2020-05-15 13:41:26 +03:00
|
|
|
projects: [ProjectMetadata];
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Errors
|
2020-07-21 15:59:40 +03:00
|
|
|
|
2020-05-15 13:41:26 +03:00
|
|
|
- [`ProjectDataStoreError`](#projectdatastoreerror) to signal problems with
|
|
|
|
underlying data store.
|
2021-02-09 13:55:32 +03:00
|
|
|
- [`GlobalConfigurationAccessError`](#globalconfigurationaccesserror) to signal
|
|
|
|
that the global configuration file could not be accessed or parsed.
|
2020-05-15 13:41:26 +03:00
|
|
|
|
|
|
|
### `project/create`
|
2020-07-21 15:59:40 +03:00
|
|
|
|
2020-05-15 13:41:26 +03:00
|
|
|
This message requests the creation of a new project.
|
|
|
|
|
2020-11-02 11:58:33 +03:00
|
|
|
To create a project, an engine version associated with it needs to be installed.
|
|
|
|
Depending on `missingComponentAction`, any components required to complete the
|
|
|
|
operation are missing will be installed or a failure will be reported.
|
|
|
|
|
2020-05-15 13:41:26 +03:00
|
|
|
- **Type:** Request
|
|
|
|
- **Direction:** Client -> Server
|
|
|
|
- **Connection:** Protocol
|
|
|
|
- **Visibility:** Public
|
|
|
|
|
|
|
|
#### Parameters
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
interface ProjectCreateRequest {
|
2020-11-02 11:58:33 +03:00
|
|
|
/** Name of the project to create. */
|
2020-05-15 13:41:26 +03:00
|
|
|
name: String;
|
2020-11-02 11:58:33 +03:00
|
|
|
|
2021-07-27 19:13:14 +03:00
|
|
|
/** The name of the project template to create. */
|
|
|
|
projectTemplate?: String;
|
|
|
|
|
2020-11-02 11:58:33 +03:00
|
|
|
/**
|
|
|
|
* Enso Engine version to use for the project.
|
|
|
|
*
|
|
|
|
* Possible values are:
|
|
|
|
* - a semver version string identifying an Enso engine version,
|
|
|
|
* - `default` to use the current default.
|
|
|
|
*
|
|
|
|
* The field is optional - if it is missing, it is treated as `default`.
|
|
|
|
*/
|
|
|
|
version?: String;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Specifies how to handle missing components.
|
|
|
|
*
|
2020-12-02 18:56:47 +03:00
|
|
|
* If not provided, defaults to `Fail`.
|
2020-11-02 11:58:33 +03:00
|
|
|
*/
|
|
|
|
missingComponentAction?: MissingComponentAction;
|
2024-02-12 12:46:40 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Custom directory with the user projects.
|
|
|
|
*/
|
|
|
|
projectsDirectory?: string;
|
2020-05-15 13:41:26 +03:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Result
|
|
|
|
|
|
|
|
```typescript
|
2021-07-29 11:02:53 +03:00
|
|
|
interface ProjectCreateResponse {
|
2020-05-15 13:41:26 +03:00
|
|
|
projectId: UUID;
|
2021-07-29 11:02:53 +03:00
|
|
|
projectName: string;
|
2024-03-21 18:38:43 +03:00
|
|
|
projectNormalizedName: string;
|
2020-05-15 13:41:26 +03:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Errors
|
2020-07-21 15:59:40 +03:00
|
|
|
|
2020-05-15 13:41:26 +03:00
|
|
|
- [`ProjectNameValidationError`](#projectnamevalidationerror) to signal
|
|
|
|
validation failures.
|
|
|
|
- [`ProjectDataStoreError`](#projectdatastoreerror) to signal problems with
|
|
|
|
underlying data store.
|
2020-07-21 15:59:40 +03:00
|
|
|
- [`ProjectExistsError`](#projectexistserror) to signal that the project already
|
|
|
|
exists.
|
2020-11-02 11:58:33 +03:00
|
|
|
- [`MissingComponentError`](#missingcomponenterror) to signal that the component
|
|
|
|
required to create the project was missing (only in case
|
|
|
|
`missingComponentAction` was set to `fail`).
|
|
|
|
- [`BrokenComponentError`](#brokencomponenterror) to signal that the component
|
|
|
|
required to create the project was being installed but is marked as broken
|
|
|
|
(only in case `missingComponentAction` was set to `install`).
|
|
|
|
- [`ComponentInstallationError`](#componentinstallationerror) to signal that the
|
|
|
|
installation of a missing component has failed.
|
|
|
|
- [`ProjectManagerUpgradeRequired`](#projectmanagerupgraderequired) to signal
|
|
|
|
that the requested engine version requires a more recent project manager, so
|
|
|
|
an upgrade has to be performed before continuing.
|
2020-05-15 13:41:26 +03:00
|
|
|
|
2020-07-01 16:55:50 +03:00
|
|
|
### `project/rename`
|
2020-07-21 15:59:40 +03:00
|
|
|
|
2020-07-01 16:55:50 +03:00
|
|
|
This message requests the renaming of a project.
|
|
|
|
|
|
|
|
- **Type:** Request
|
|
|
|
- **Direction:** Client -> Server
|
|
|
|
- **Connection:** Protocol
|
|
|
|
- **Visibility:** Public
|
|
|
|
|
|
|
|
#### Parameters
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
interface ProjectRenameRequest {
|
|
|
|
projectId: UUID;
|
2024-02-12 12:46:40 +03:00
|
|
|
|
2020-07-01 16:55:50 +03:00
|
|
|
name: String;
|
2024-02-12 12:46:40 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Custom directory with the user projects.
|
|
|
|
*/
|
|
|
|
projectsDirectory?: string;
|
2020-07-01 16:55:50 +03:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Result
|
|
|
|
|
|
|
|
```
|
|
|
|
null
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Errors
|
2020-07-21 15:59:40 +03:00
|
|
|
|
2020-07-01 16:55:50 +03:00
|
|
|
- [`ProjectNameValidationError`](#projectnamevalidationerror) to signal
|
|
|
|
validation failures.
|
|
|
|
- [`ProjectDataStoreError`](#projectdatastoreerror) to signal problems with
|
|
|
|
underlying data store.
|
|
|
|
- [`ProjectExistsError`](#projectexistserror) to signal that the project with
|
|
|
|
the provided name already exists.
|
2020-11-02 11:58:33 +03:00
|
|
|
- [`ServiceError`](./protocol-common.md#serviceerror) to signal that the the
|
|
|
|
operation timed out.
|
2020-07-01 16:55:50 +03:00
|
|
|
- [`LanguageServerError`](#languageservererror) to signal generic language
|
|
|
|
server failures.
|
2020-05-15 13:41:26 +03:00
|
|
|
|
|
|
|
### `project/delete`
|
2020-07-21 15:59:40 +03:00
|
|
|
|
2020-05-15 13:41:26 +03:00
|
|
|
This message requests the deletion of a project.
|
|
|
|
|
|
|
|
- **Type:** Request
|
|
|
|
- **Direction:** Client -> Server
|
|
|
|
- **Connection:** Protocol
|
|
|
|
- **Visibility:** Public
|
|
|
|
|
|
|
|
#### Parameters
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
interface ProjectDeleteRequest {
|
|
|
|
projectId: UUID;
|
2024-02-12 12:46:40 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Custom directory with the user projects.
|
|
|
|
*/
|
|
|
|
projectsDirectory?: string;
|
2020-05-15 13:41:26 +03:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Result
|
|
|
|
|
|
|
|
```typescript
|
2020-07-21 15:59:40 +03:00
|
|
|
{
|
|
|
|
}
|
2020-05-15 13:41:26 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
#### Errors
|
2020-07-21 15:59:40 +03:00
|
|
|
|
2020-05-15 13:41:26 +03:00
|
|
|
- [`ProjectDataStoreError`](#projectdatastoreerror) to signal problems with
|
|
|
|
underlying data store.
|
|
|
|
- [`ProjectNotFoundError`](#projectnotfounderror) to signal that the project
|
|
|
|
doesn't exist.
|
|
|
|
- [`CannotRemoveOpenProjectError`](#cannotremoveopenprojecterror) to signal that
|
|
|
|
the project cannot be removed, because is open by at least one user.
|
|
|
|
|
|
|
|
### `project/listSample`
|
2020-07-21 15:59:40 +03:00
|
|
|
|
2020-05-15 13:41:26 +03:00
|
|
|
This request lists the sample projects that are available to the user.
|
|
|
|
|
|
|
|
- **Type:** Request
|
|
|
|
- **Direction:** Client -> Server
|
|
|
|
- **Connection:** Protocol
|
|
|
|
- **Visibility:** Public
|
|
|
|
|
|
|
|
#### Parameters
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
interface ProjectListSampleRequest {
|
|
|
|
numProjects: Int;
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Result
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
interface ProjectListSampleResponse {
|
|
|
|
projects: [ProjectMetadata];
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Errors
|
2020-07-21 15:59:40 +03:00
|
|
|
|
2020-05-15 13:41:26 +03:00
|
|
|
TBC
|
|
|
|
|
2023-09-22 13:05:44 +03:00
|
|
|
### `project/status`
|
|
|
|
|
|
|
|
This request asks for the current state of the project.
|
|
|
|
|
|
|
|
- **Type:** Request
|
|
|
|
- **Direction:** Client -> Server
|
|
|
|
- **Connection:** Protocol
|
|
|
|
- **Visibility:** Public
|
|
|
|
|
|
|
|
#### Parameters
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
interface ProjectStatusRequest {
|
|
|
|
projectID: UUID;
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Result
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
interface ProjectStatusResponse {
|
|
|
|
status: RunningStatus;
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2024-07-02 14:39:43 +03:00
|
|
|
### `project/duplicate`
|
|
|
|
|
|
|
|
This message requests to make a copy of the project.
|
|
|
|
|
|
|
|
- **Type:** Request
|
|
|
|
- **Direction:** Client -> Server
|
|
|
|
- **Connection:** Protocol
|
|
|
|
- **Visibility:** Public
|
|
|
|
|
|
|
|
#### Parameters
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
interface ProjectDuplicateRequest {
|
|
|
|
/**
|
|
|
|
* The project to duplicate.
|
|
|
|
*/
|
|
|
|
projectId: UUID;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Custom directory with the user projects.
|
|
|
|
*/
|
|
|
|
projectsDirectory?: string;
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Result
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
interface ProjectDuplicateResponse {
|
|
|
|
projectId: UUID;
|
|
|
|
projectName: string;
|
|
|
|
projectNormalizedName: string;
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Errors
|
|
|
|
|
|
|
|
- [`ProjectDataStoreError`](#projectdatastoreerror) to signal problems with
|
|
|
|
underlying data store.
|
|
|
|
- [`ProjectNotFoundError`](#projectnotfounderror) to signal that the project
|
|
|
|
doesn't exist.
|
|
|
|
- [`ServiceError`](./protocol-common.md#serviceerror) to signal that the the
|
|
|
|
operation timed out.
|
|
|
|
|
2020-11-02 11:58:33 +03:00
|
|
|
## Action Progress Reporting
|
|
|
|
|
|
|
|
Some actions, especially those related to installation of new components may
|
|
|
|
take a long time (for example because big packages need to be downloaded).
|
|
|
|
|
|
|
|
The protocol includes notifications tied to such actions that can be used to
|
|
|
|
display progress bars.
|
|
|
|
|
|
|
|
Each task has a lifecycle of being initialized with a `task/started`
|
|
|
|
notification (which contains a UUID that identifies that task), being updated
|
|
|
|
with `task/progress-update` and finalized with `task/finished`. `task/finished`
|
|
|
|
may include an error (but please note that regardless of the task-related error,
|
|
|
|
the error will also be reported for the original request associated with the
|
|
|
|
task, for example as `ComponentInstallationError` returned for the
|
|
|
|
`project/open` request that triggered the installation).
|
|
|
|
|
|
|
|
Tasks are sent while an operation is being processed and a single operation may
|
|
|
|
consist of several (sub)tasks.
|
|
|
|
|
|
|
|
For example, when opening a project the flow may be following:
|
|
|
|
|
|
|
|
- `project/open` request sent to the server
|
|
|
|
- notification `task/started` (downloading the archive)
|
|
|
|
- multiple notifications `task/progress-update` related to that task
|
|
|
|
- notification `task/finished`
|
|
|
|
- notification `task/started` (extracting the archive)
|
|
|
|
- multiple notifications `task/progress-update` related to that task
|
|
|
|
- notification `task/finished`
|
|
|
|
- reply to the original `project/open` request
|
|
|
|
|
|
|
|
All task progress updates happen within the response/request flow (up to a
|
|
|
|
possible reordering of messages).
|
|
|
|
|
|
|
|
### `task/started`
|
|
|
|
|
|
|
|
Indicates that a long running task has been started.
|
|
|
|
|
|
|
|
Currently only used when components are being installed to show installation
|
|
|
|
progress.
|
|
|
|
|
|
|
|
- **Type:** Notification
|
|
|
|
- **Direction:** Server -> Client
|
|
|
|
- **Connection:** Protocol
|
|
|
|
- **Visibility:** Public
|
|
|
|
|
|
|
|
#### Parameters
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
interface TaskStartNotification {
|
|
|
|
/**
|
|
|
|
* Unique identifier of the task, used to correlate progress updates and the
|
|
|
|
* finished notification.
|
|
|
|
*/
|
|
|
|
taskId: UUID;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Name of the operation this task is related to, for example
|
|
|
|
* `project/open`.
|
|
|
|
*/
|
|
|
|
relatedOperation: String;
|
|
|
|
|
|
|
|
/** Unit in which progress of this task is measured. */
|
|
|
|
unit: ProgressUnit;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Indicates total expected progress.
|
|
|
|
*
|
|
|
|
* May be missing, as it is not always known, for example when downloading a
|
|
|
|
* file of unknown size or waiting on a lock.
|
|
|
|
*/
|
2020-11-16 20:49:59 +03:00
|
|
|
total?: Long;
|
2020-11-02 11:58:33 +03:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### `task/progress-update`
|
|
|
|
|
|
|
|
Indicates a progress update for a specific task.
|
|
|
|
|
|
|
|
- **Type:** Notification
|
|
|
|
- **Direction:** Server -> Client
|
|
|
|
- **Connection:** Protocol
|
|
|
|
- **Visibility:** Public
|
|
|
|
|
|
|
|
#### Parameters
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
interface TaskUpdateNotification {
|
|
|
|
taskId: UUID;
|
|
|
|
|
|
|
|
/** Optional message explaining current status of the task. */
|
|
|
|
message?: String;
|
|
|
|
|
|
|
|
/** Indicates amount of progress, for example: count of processed bytes. */
|
2020-11-16 20:49:59 +03:00
|
|
|
done: Long;
|
2020-11-02 11:58:33 +03:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### `task/finished`
|
|
|
|
|
|
|
|
Indicates that a task has been finished, either successfully or with an error.
|
|
|
|
|
|
|
|
- **Type:** Notification
|
|
|
|
- **Direction:** Server -> Client
|
|
|
|
- **Connection:** Protocol
|
|
|
|
- **Visibility:** Public
|
|
|
|
|
|
|
|
#### Parameters
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
interface TaskFinishedNotification {
|
|
|
|
taskId: UUID;
|
|
|
|
|
|
|
|
/** Optional message informing about task completion. */
|
|
|
|
message?: String;
|
|
|
|
|
|
|
|
/** Specifies if the task succeeded or failed. */
|
|
|
|
success: bool;
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2020-11-16 20:49:59 +03:00
|
|
|
## Runtime Version Management
|
2020-11-02 11:58:33 +03:00
|
|
|
|
|
|
|
### `engine/list-installed`
|
|
|
|
|
|
|
|
Lists engine versions currently installed.
|
|
|
|
|
|
|
|
Please note that the broken marks associated with each engine currently
|
|
|
|
represent the state at the moment of installation. As of now, if the broken mark
|
|
|
|
has been added later, it is not updated automatically.
|
|
|
|
|
|
|
|
- **Type:** Request
|
|
|
|
- **Direction:** Client -> Server
|
|
|
|
- **Connection:** Protocol
|
|
|
|
- **Visibility:** Public
|
|
|
|
|
|
|
|
#### Parameters
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
null;
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Result
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
interface EngineVersionListResponse {
|
|
|
|
/** List of installed engines. */
|
|
|
|
versions: [EngineVersion];
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Errors
|
|
|
|
|
|
|
|
TBC
|
|
|
|
|
|
|
|
### `engine/list-available`
|
|
|
|
|
|
|
|
Queries the repository to list all engine versions that are available to be
|
|
|
|
installed.
|
|
|
|
|
|
|
|
- **Type:** Request
|
|
|
|
- **Direction:** Client -> Server
|
|
|
|
- **Connection:** Protocol
|
|
|
|
- **Visibility:** Public
|
|
|
|
|
|
|
|
#### Parameters
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
null;
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Result
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
interface EngineVersionListResponse {
|
|
|
|
/** List of available engines. */
|
|
|
|
versions: [EngineVersion];
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Errors
|
|
|
|
|
|
|
|
- [`ComponentRepositoryUnavailable`](#componentrepositoryunavailable) to signal
|
|
|
|
that the component repository could not be reached.
|
|
|
|
|
|
|
|
### `engine/install`
|
|
|
|
|
|
|
|
Requests to install the specified engine version. If that version is already
|
2020-11-16 20:49:59 +03:00
|
|
|
installed, it has no effect.
|
2020-11-02 11:58:33 +03:00
|
|
|
|
|
|
|
- **Type:** Request
|
|
|
|
- **Direction:** Client -> Server
|
|
|
|
- **Connection:** Protocol
|
|
|
|
- **Visibility:** Public
|
|
|
|
|
|
|
|
#### Parameters
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
interface EngineInstallRequest {
|
|
|
|
/** Semver string of engine version that should be installed. */
|
|
|
|
version: String;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Specifies whether the engine should be installed even if it is marked as
|
|
|
|
* broken.
|
|
|
|
*
|
|
|
|
* If not provided, defaults to `false`.
|
|
|
|
*/
|
|
|
|
forceInstallBroken?: bool;
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Result
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
null;
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Errors
|
|
|
|
|
|
|
|
- [`BrokenComponentError`](#brokencomponenterror) to signal that the requested
|
|
|
|
engine version is marked as broken (only in case `forceInstallBroken` was set
|
|
|
|
to `false`).
|
|
|
|
- [`ComponentInstallationError`](#componentinstallationerror) to signal that the
|
|
|
|
installation of a missing component has failed.
|
|
|
|
- [`ProjectManagerUpgradeRequired`](#projectmanagerupgraderequired) to signal
|
|
|
|
that the requested engine version requires a more recent project manager, so
|
|
|
|
an upgrade has to be performed before continuing.
|
|
|
|
|
|
|
|
### `engine/uninstall`
|
|
|
|
|
|
|
|
Requests to uninstall the specified engine version.
|
|
|
|
|
2020-11-16 20:49:59 +03:00
|
|
|
If that version was not installed, it has no effect.
|
|
|
|
|
2020-11-02 11:58:33 +03:00
|
|
|
- **Type:** Request
|
|
|
|
- **Direction:** Client -> Server
|
|
|
|
- **Connection:** Protocol
|
|
|
|
- **Visibility:** Public
|
|
|
|
|
|
|
|
#### Parameters
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
interface EngineUninstallRequest {
|
|
|
|
/** Semver string of engine version that should be uninstalled. */
|
|
|
|
version: String;
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Result
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
null;
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Errors
|
|
|
|
|
|
|
|
- [`ComponentUninstallationError`](#componentuninstallationerror) to signal that
|
|
|
|
the component could not have been uninstalled.
|
|
|
|
|
|
|
|
## Logging Service
|
|
|
|
|
|
|
|
### `logging-service/get-endpoint`
|
|
|
|
|
|
|
|
Requests the endpoint for connecting to the logging service.
|
|
|
|
|
2024-06-20 16:07:54 +03:00
|
|
|
---
|
|
|
|
|
2020-11-02 11:58:33 +03:00
|
|
|
- **Type:** Request
|
|
|
|
- **Direction:** Client -> Server
|
|
|
|
- **Connection:** Protocol
|
|
|
|
- **Visibility:** Public
|
|
|
|
|
|
|
|
#### Parameters
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
null;
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Result
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
interface LoggingServiceEndpointResponse {
|
|
|
|
uri: String;
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
#### Errors
|
|
|
|
|
|
|
|
- [`LoggingServiceUnavailable`](#loggingserviceunavailable) to signal that the
|
|
|
|
logging service is unavailable.
|
|
|
|
|
2020-05-15 13:41:26 +03:00
|
|
|
## Language Server Management
|
2020-07-21 15:59:40 +03:00
|
|
|
|
2020-05-15 13:41:26 +03:00
|
|
|
The project manager is also responsible for managing the language server. This
|
|
|
|
means that it needs to be able to spawn the process, but also tell the process
|
|
|
|
when to shut down.
|
|
|
|
|
2020-11-02 11:58:33 +03:00
|
|
|
A language server process is spawned within the `project/open` call. That call
|
|
|
|
returns endpoints that the client can use to connect to the language server.
|
|
|
|
When `project/close` is called, the language server is shutdown. Moreover,
|
|
|
|
between these two calls, the project manager sends heartbeat messages to the
|
|
|
|
language server to check if it is still running. In case that it has crashed, a
|
|
|
|
restart is attempted.
|
2020-05-15 13:41:26 +03:00
|
|
|
|
|
|
|
## Errors
|
2020-07-21 15:59:40 +03:00
|
|
|
|
2020-05-15 13:41:26 +03:00
|
|
|
The project manager component has its own set of errors. This section is not a
|
|
|
|
complete specification and will be updated as new errors are added.
|
|
|
|
|
2020-11-02 11:58:33 +03:00
|
|
|
Besides the required `code` and `message` fields, the errors may have a `data`
|
|
|
|
field which can store additional error-specific payload.
|
|
|
|
|
|
|
|
### `MissingComponentError`
|
|
|
|
|
|
|
|
Signals that a component required to complete the action was missing, but the
|
|
|
|
action did not ask for it to be automatically installed.
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
"error" : {
|
|
|
|
"code" : 4020,
|
|
|
|
"message" : "Engine 1.2.3 is required to complete the action but it is not installed."
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### `BrokenComponentError`
|
|
|
|
|
|
|
|
Signals that a component that was being installed is marked as broken, but the
|
|
|
|
option to forcibly install broken components was not set.
|
|
|
|
|
|
|
|
This error may handled by warning the user about the broken version or
|
|
|
|
suggesting to upgrade the project and asking to confirm using the broken
|
|
|
|
version. If the user wants to ignore the warning, the operation can be
|
|
|
|
reattempted with the option to forcibly install broken components.
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
"error" : {
|
|
|
|
"code" : 4021,
|
|
|
|
"message" : "Engine 1.2.3 is marked as broken."
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### `ProjectManagerUpgradeRequired`
|
|
|
|
|
|
|
|
Signals that installation of a missing compoment has been attempted, but the
|
|
|
|
required engine version requires a newer version of project manager than what is
|
|
|
|
currently running.
|
|
|
|
|
|
|
|
This error type includes the optional `data` field which is an object with a
|
|
|
|
field `minimumRequiredVersion` that is a semver string of the project manager
|
|
|
|
version that is required to complete the related action.
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
"error" : {
|
|
|
|
"code" : 4022,
|
|
|
|
"message" : "Project manager 1.2.3 is required to install the requested engine. Please upgrade.",
|
2022-03-04 11:57:49 +03:00
|
|
|
"payload": {
|
2020-11-02 11:58:33 +03:00
|
|
|
"minimumRequiredVersion": "1.2.3"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### `ComponentInstallationError`
|
|
|
|
|
|
|
|
Signals that installation of a missing component has been attempted but it has
|
|
|
|
failed.
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
"error" : {
|
|
|
|
"code" : 4023,
|
|
|
|
"message" : "A problem occurred when trying to find the release: Cannot find release `enso-1.2.3-not-published`."
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### `ComponentUninstallationError`
|
|
|
|
|
|
|
|
Signals that uninstallation of a component has failed.
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
"error" : {
|
|
|
|
"code" : 4024,
|
|
|
|
"message" : "The requested engine version is not installed."
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### `ComponentRepositoryUnavailable`
|
|
|
|
|
|
|
|
Signals that the repository is unavailable and could not be queried (usually
|
|
|
|
caused by lack of internet connection).
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
"error" : {
|
|
|
|
"code" : 4025,
|
|
|
|
"message" : "Could not connect to github.com"
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2020-05-15 13:41:26 +03:00
|
|
|
### `ProjectNameValidationError`
|
2020-07-21 15:59:40 +03:00
|
|
|
|
2020-05-15 13:41:26 +03:00
|
|
|
Signals validation failures.
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
"error" : {
|
|
|
|
"code" : 4001,
|
|
|
|
"message" : "Cannot create project with empty name"
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### `ProjectDataStoreError`
|
2020-07-21 15:59:40 +03:00
|
|
|
|
2020-05-15 13:41:26 +03:00
|
|
|
Signals problems with underlying data store.
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
"error" : {
|
|
|
|
"code" : 4002,
|
|
|
|
"message" : "Cannot load project index"
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### `ProjectExistsError`
|
2020-07-21 15:59:40 +03:00
|
|
|
|
2020-05-15 13:41:26 +03:00
|
|
|
Signals that the project already exists.
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
"error" : {
|
|
|
|
"code" : 4003,
|
|
|
|
"message" : "Project with the provided name exists"
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### `ProjectNotFoundError`
|
2020-07-21 15:59:40 +03:00
|
|
|
|
2020-05-15 13:41:26 +03:00
|
|
|
Signals that the project doesn't exist.
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
"error" : {
|
|
|
|
"code" : 4004,
|
|
|
|
"message" : "Project with the provided id does not exist"
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### `ProjectOpenError`
|
2020-07-21 15:59:40 +03:00
|
|
|
|
2020-05-15 13:41:26 +03:00
|
|
|
Signals that the project cannot be open due to boot failures.
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
"error" : {
|
|
|
|
"code" : 4005,
|
|
|
|
"message" : "A boot failure."
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### `ProjectNotOpenError`
|
2020-07-21 15:59:40 +03:00
|
|
|
|
2020-05-15 13:41:26 +03:00
|
|
|
Signals that cannot close project that is not open.
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
"error" : {
|
|
|
|
"code" : 4006,
|
|
|
|
"message" : "Cannot close project that is not open"
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### `ProjectOpenByOtherPeersError`
|
2020-07-21 15:59:40 +03:00
|
|
|
|
2020-05-15 13:41:26 +03:00
|
|
|
Signals that cannot close a project that is open by other clients.
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
"error" : {
|
|
|
|
"code" : 4007,
|
|
|
|
"message" : "Cannot close project because it is open by other peers"
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### `CannotRemoveOpenProjectError`
|
2020-07-21 15:59:40 +03:00
|
|
|
|
2020-05-15 13:41:26 +03:00
|
|
|
Signals that cannot remove open project.
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
"error" : {
|
|
|
|
"code" : 4008,
|
|
|
|
"message" : "Cannot remove open project"
|
|
|
|
}
|
|
|
|
```
|
2020-07-01 16:55:50 +03:00
|
|
|
|
|
|
|
### `ProjectCloseError`
|
2020-07-21 15:59:40 +03:00
|
|
|
|
2020-07-01 16:55:50 +03:00
|
|
|
Signals failures during shutdown of a server.
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
"error" : {
|
|
|
|
"code" : 4009,
|
|
|
|
"message" : "A shutdown failure."
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
### `LanguageServerError`
|
2020-07-21 15:59:40 +03:00
|
|
|
|
2020-07-01 16:55:50 +03:00
|
|
|
Signals generic language server errors.
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
"error" : {
|
|
|
|
"code" : 4010,
|
|
|
|
"message" : "The language server is unresponsive"
|
|
|
|
}
|
2020-07-21 15:59:40 +03:00
|
|
|
```
|
2020-11-02 11:58:33 +03:00
|
|
|
|
|
|
|
### `GlobalConfigurationAccessError`
|
|
|
|
|
|
|
|
Signals that the global configuration file could not be accessed or parsed.
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
"error" : {
|
|
|
|
"code" : 4011,
|
|
|
|
"message" : "The global configuration file is malformed."
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2020-12-02 18:56:47 +03:00
|
|
|
### `ProjectCreateError`
|
|
|
|
|
|
|
|
Signals that an error occurred when creating the project.
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
"error" : {
|
|
|
|
"code" : 4012,
|
|
|
|
"message" : "Could not create the project."
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2020-11-02 11:58:33 +03:00
|
|
|
### `LoggingServiceUnavailable`
|
|
|
|
|
|
|
|
Signals that the logging service is not available.
|
|
|
|
|
|
|
|
```typescript
|
|
|
|
"error" : {
|
2020-12-02 18:56:47 +03:00
|
|
|
"code" : 4013,
|
2020-11-02 11:58:33 +03:00
|
|
|
"message" : "The logging service has failed to boot."
|
|
|
|
}
|
|
|
|
```
|