Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
0441d79
IntelliJ extension basics
jonah-iden Mar 28, 2025
4fee72d
basic updating and highlighting in editor
jonah-iden Mar 28, 2025
2aab2f8
working editing
jonah-iden Mar 31, 2025
a47d77c
some ui for the extension
jonah-iden Mar 31, 2025
026d231
further progress with virtual file system
jonah-iden Apr 4, 2025
28ea1ff
multiple fixes for joining
jonah-iden Apr 9, 2025
4ea6052
fixed to new authentication method
jonah-iden Apr 11, 2025
92f1171
basic ui and different colors for peers plus other smaller changes
jonah-iden Apr 23, 2025
9fbbb25
disposable fixes and other smaller fixes
jonah-iden Apr 24, 2025
ac11ebf
build fix after rebase
jonah-iden Apr 24, 2025
85d5098
follow ui
jonah-iden Apr 25, 2025
30e473f
improvements for follow
jonah-iden May 7, 2025
6eeadce
bettter authentication service
jonah-iden May 13, 2025
1dd9a12
updated Service process generic message api
jonah-iden May 15, 2025
3e0a1aa
fylsystem sync changes
jonah-iden May 16, 2025
a4a7d1f
smaller filesytem synch changes
jonah-iden May 20, 2025
7e7d8d7
working virtual fily system synch
jonah-iden May 20, 2025
b895140
working closing project on session close and deleting of the temporar…
jonah-iden May 21, 2025
0f82bcf
some fixes for hosting session and some renames
jonah-iden May 22, 2025
95c144a
working write file
jonah-iden May 23, 2025
426b6e1
small file system improvements
jonah-iden May 26, 2025
ed97cd8
loading dialog for creating room
jonah-iden May 27, 2025
4d5f906
fix small sharing issue
jonah-iden May 27, 2025
d8c1859
status bar widget and other smaller fixes
jonah-iden May 28, 2025
697b6f9
moved intelliJ package to own repository
jonah-iden May 28, 2025
709efed
fixed service-process-test and added readme
jonah-iden May 30, 2025
5b87aff
small fix for leave room
jonah-iden Dec 3, 2025
8747456
choosable port for attach launch config
jonah-iden Dec 4, 2025
13a5c81
copilot review comments
jonah-iden Dec 4, 2025
6872792
fix the SEA build
jonah-iden Dec 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true

[*.xml]
indent_size = 2

[*.yml]
indent_size = 2

Expand Down
15 changes: 15 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "attach",
"name": "Attach to Service Process",
"port": "${input:attachPort}",

},
{
"type": "node",
"request": "launch",
Expand Down Expand Up @@ -85,5 +92,13 @@
"sourceMaps": true,
"outFiles": []
}
],
"inputs": [
{
"id": "attachPort",
"type": "promptString",
"description": "What port should the application use for debugging?",
"default": "23698"
}
]
}
76 changes: 76 additions & 0 deletions packages/open-collaboration-service-process/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Open Collaboration Service Process

Open Collaboration Tools is a collection of open source tools, libraries and extensions for live-sharing of IDE contents, designed to boost remote teamwork with open technologies. For more information about this project, please [read the announcement](https://www.typefox.io/blog/open-collaboration-tools-announcement/).

This package is a standalone Node.js application, which helps to simplify integration of OCT with non-TypeScript environments, by providing a stdin/stdout based [JSON-RPC](https://www.jsonrpc.org/) API.

It takes over encryption, session lifecycle management, and includes Yjs integration for collision-free real-time editing of documents,
so client applications do not need to implement these complex features themselves.

The artifact needs to be cjs to be able to be bundled and made into an SEA because of socket.io's dynamic requires.

## Usage

### Starting the Service Process

Start the process by either using [Node.js](https://nodejs.org) to call `process.js` or use a prebuilt executable:

```sh
node ./lib/process.js --server-address http://localhost:8100 --auth-token <your-auth-token>
```

- `--server-address` (**required**): The address of the collaboration server to connect to (e.g., `https://api.open-collab.tools`).
- `--auth-token` (**optional**): The authentication token to use for the session, if saved by the application from a previous login

### Communication Protocol

All communication happens via JSON-RPC 2.0 messages over stdin/stdout.
See [messages.ts](src/messages.ts) for service process specific awareness or lifecycle messages. Other messages follow the open-collaboration-protocol.

For specific examples see `service.process.test.ts` or the [IntellIJ integration](https://github.com/eclipse-oct/oct-intellij)

### Sending and Receiving Binary Data

- For efficient document and file transfer, binary data is supported.
- Use the `BinaryData` type for parameters or results that contain binary content.
- Binary data is encoded as base64-encoded [MessagePack](https://msgpack.org/) in the `data` field of a `BinaryData` object.

#### Example: Sending Binary Data

```json
{
"jsonrpc": "2.0",
"id": 1,
"method": "awareness/getDocumentContent",
"params": ["path/to/file"]
}
```

The response will be:

```json
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"type": "binaryData",
"data": "<base64-encoded-messagepack>"
}
}
```

Or sending Binary Data as a Parameter:

```json
{
"jsonrpc": "2.0",
"id": 2,
"method": "fileSystem/writeFile",
"params": [
{
"type": "binaryData",
"data": "<base64-encoded-messagepack>"
}
]
}
```
2 changes: 1 addition & 1 deletion packages/open-collaboration-service-process/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"scripts": {
"start": "node lib/process.js",
"start:direct": "tsx src/process.ts",
"build": "esbuild ./lib/process.js --bundle --platform=node --format=esm --outfile=lib/bundle.js",
"build": "esbuild ./src/process.ts --bundle --platform=node --format=cjs --outfile=lib/bundle.cjs",
"create:executable": "npm run build && shx mkdir -p bin && node --experimental-sea-config sea-config.json && node scripts/sea-build.mjs"
},
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { inject } from 'postject'
* The resulting executable can be run as a standalone application without the need of nodejs being installed
*/

var EXECUTABLE_NAME = 'oct-servcice-process'
var EXECUTABLE_NAME = 'oct-service-process'

if (process.platform === 'win32') {
EXECUTABLE_NAME = EXECUTABLE_NAME + '.exe'
Expand Down
Loading