Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
249212a
Add spec: strip scorpio to unique features for parallel installation
Predixx May 4, 2026
f45e838
Add implementation plan for scorpio strip (codex-reviewed)
Predixx May 4, 2026
3037635
Delete all stripped source files, shared models, webview, and unused …
Predixx May 4, 2026
9ec324a
Rewrite extension.ts: keep only auth, theia init, and three commands
Predixx May 4, 2026
480a319
Strip settings.ts: remove circular dep, easter egg, and restart logic
Predixx May 4, 2026
8e3e477
Strip cloning.service.ts: remove cloneUserRepo and dead imports
Predixx May 4, 2026
4cd9bd8
Add idempotence guard: skip auto-clone if repo already matches GIT_URI
Predixx May 4, 2026
05d84b7
Remove dead retrieveVcsAccessToken from authentication client
Predixx May 4, 2026
fb25d8e
DataBridge: only require ARTEMIS_TOKEN/URL/GIT_URI, auto-set THEIA_FLAG
Predixx May 4, 2026
064c6fc
tsconfig: remove shared aliases, WebWorker lib, webview exclude
Predixx May 4, 2026
3ad9527
Strip package.json: remove unused deps, views, commands, menus, brows…
Predixx May 4, 2026
edc061b
webpack: Node-only config, remove browser polyfills, test entry, plugins
Predixx May 4, 2026
48fdaea
Fix type errors: replace BodyInit with string, cast json response, re…
Predixx May 4, 2026
69c67b2
Regenerate package-lock.json after dependency cleanup
Predixx May 4, 2026
55bb1c0
Remove auth infrastructure, clean up ARTEMIS_TOKEN dependency, update…
Predixx May 15, 2026
d65fc70
Clean up post-strip cruft: dead configs, credentials, packaging
Predixx May 19, 2026
0a46dd9
Bump brace-expansion and fast-uri to non-vulnerable versions via npm …
Predixx May 19, 2026
804429e
Merge main into strip-scorpio-features
Mtze Aug 21, 2026
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
18 changes: 0 additions & 18 deletions .eslintrc.json

This file was deleted.

26 changes: 5 additions & 21 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,28 +13,12 @@
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
"preLaunchTask": "${defaultBuildTask}",
"env": {
// "THEIA":"true",
// "ARTEMIS_TOKEN":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhcnRlbWlzX3Rlc3RfdXNlcl8xIiwiYXV0aCI6IlJPTEVfVVNFUiIsInRvb2xzIjoiU0NPUlBJTyIsImV4cCI6MTczOTY1MzI0N30.OpCoHLV-h3pF_FXrspb455eGC7ltYsE68YZjxTT9RXChSrxOhkuZMRnhHV3dyzhjvNi7pzgvKnvg7ko3F9N-8w",
// Uncomment to simulate a Theia environment locally.
// "THEIA": "true",
"ARTEMIS_URL": "https://artemis-test1.artemis.cit.tum.de"
// "GIT_URI":"https://artemis_test_user_1:vcpat-8gBv37zCDU5OSVVVBPYJrn6pjOCmYKCSxe7ZrA954g6P@artemis-test9.artemis.cit.tum.de/git/THEIATESTTESTEXERCISE/theiatesttestexercise-artemis_test_user_1.git",
// "GIT_USER":"dennis",
// "GIT_MAIL":"dp.jandow@gmail.com"
}
},
{
"name": "Extension Tests",
"type": "extensionHost",
"debugWebWorkerHost": true,
"request": "launch",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
// "--extensionDevelopmentKind=web",
"--extensionTestsPath=${workspaceFolder}/dist/test/suite/index"
],
"outFiles": ["${workspaceFolder}/dist/**/*.js"],
"preLaunchTask": "${defaultBuildTask}",
"env": {
"DEBUG": "true"
// "GIT_URI": "https://<user>:<vcs-token>@<host>/git/<project>/<repo>.git",
// "GIT_USER": "<git-user>",
// "GIT_MAIL": "<git-email>"
}
}
]
Expand Down
16 changes: 5 additions & 11 deletions .vscodeignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,11 @@ webpack.config.js
esbuild.js
.github/**

#Ignore all webview files except build directory
webview/src/**
webview/public/**
webview/scripts/**
webview/index.html
webview/README.md
webview/package.json
webview/package-lock.json
webview/node_modules/**
webview/.gitignore
webview/.vscode/**
# Ignore dev tooling configs
eslint.config.js
renovate.json
.oxfmtrc.json
docs/**

# Ignore misc
.yarnrc
Expand Down
21 changes: 21 additions & 0 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 TUM Applied Education Technologies

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
53 changes: 9 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,55 +1,20 @@
# Scorpio: A VSCode Extension for the Interactive Learning Platform [Artemis](https://github.com/ls1intum/Artemis)
# Scorpio: Theia Infrastructure for [Artemis](https://github.com/ls1intum/Artemis)

Scorpio is an IDE-integrated Visual Studio Code plugin for the online learning platform Artemis. The plugin seamlessly incorporates the entire programming exercise life cycle directly within the student's IDE. It enables the student to start the programming exercise, displays the instructions, offers the option to submit the exercise, and returns the submission results all within the IDE.
Scorpio provides Theia/EduIDE infrastructure for the Artemis learning platform. It handles environment setup, repository cloning, and git identity configuration in managed Theia workspaces.

## Features

_For features exclusively to the online IDE Theia Cloud, please refer to [Theia Cloud Scorpio README](README_THEIA.md)._

### Seamless Authentication

The plugin allows the student to authenticate to the Artemis Server with the known credentials from the web application.

![](.github/media/scorpio_login.gif)

### Exercise Start

The student can start the exercise from with the IDE. The exercise repository is then automatically cloned into the corresponding workspace.

![](.github/media/course_selection.gif)

![](.github/media/cloning.gif)

### Problem Statement

The plugin displays the problem statement within the IDE. The problem statement related to the exercise repository, currently open in the student's workspace, is displayed. The problem statement can be composed of text and UML diagrams.

### UML Diagram Pop Out

The plugin allows the student to inspect the UML diagrams in detail. Each UML diagram can be opened in a separate window by simply clicking on it.

![](.github/media/scorpio_uml.gif)

### Exercise Submission

The plugin allows the students to submit the exercise directly within the IDE. The submission leads to the synchronization of the student's workspace and the exercise repository and triggers the automatic assessment of the student's submission.

![](.github/media/submit.gif)

### Feedback Display

The plugin displays submission feedback within the IDE. The feedback can either be displayed inside the textual part of the problem statement or within the UML diagrams. This should enable the student to get instant submission feedback and aid the solving process.

![](.github/media/results.gif)
- **Automatic Repository Cloning:** Clones the exercise repository into the workspace root with path preservation for `.vscode/settings.json`, `.theia`, `persisted`, and `lost+found`.
- **Git Identity:** Configures `user.name` and `user.email` globally, with hostname fallback when credentials are unavailable.
- **Environment Variable Loading:** Reads Theia environment variables via DataBridge or process environment (configurable via `SCORPIO_THEIA_ENV_STRATEGY`).
- **Settings Protection:** Prevents modification of `apiBaseUrl` and `repoPath` in Theia environments.
- **Gradle Pre-warming:** After cloning a Gradle project, warms the build in the background (daemon, dependencies, or full compile) so the first build is faster. Configurable via `GRADLE_PREWARM`; non-Gradle repositories are skipped automatically.

## Extension Settings

- `scorpio.artemis.apiBaseUrl`: Specifies the base URL of the Artemis API. Default value is `https://artemis.ase.in.tum.de`
- `scorpio.artemis.apiBaseUrl`: The base URL of the Artemis Server. Default: `https://artemis.cit.tum.de`
- `scorpio.defaults.repoPath`: Default path for repository cloning (absolute path).

## Development

[Developer Guide](README_DEVELOPER.md)

## Further Reading

- Bachelor Thesis: [Scorpio: A Visual Studio Code Extension for Interactive Learning Platforms](<./.github/media/thesis/20241101 Jandow Dennis.pdf>)
89 changes: 25 additions & 64 deletions README_DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,79 +2,40 @@

## Setup

Navigate into any of the repositories files and press
Navigate into the repository and press <kbd>F5</kbd> (<kbd>fn + F5</kbd> on Mac) to start the extension in a new VS Code window with the extension loaded.

<kbd>F5</kbd> (<kbd>fn + F5</kbd> on Mac)

to start the extension [<sub> ref <sub>](https://code.visualstudio.com/api/get-started/your-first-extension#debugging-the-extension). This will open a new instance of VSCode with the extension loaded. \
Behind the scenes, this shortcut runs the default task in [./vscode/tasks.json](.vscode/tasks.json)

```bash
npm build
```

(`npm run build:webview && npm run build:extension`). This builds the extension and the webview. \
If you only make changes to the **extension**, it might be faster to set this to
Behind the scenes, this runs the default build task defined in [.vscode/tasks.json](.vscode/tasks.json):

```bash
npm run build:extension
npm run build
```

to only build the extension.

## Architecture

_The following diagram shows the architecture **WITH** implementation details. This is not a formal UML diagram, but should give you an overview of the architecture and the communication between components._

![](./.github/diagrams/architecture.drawio.png)

The extension is composed of two main components. The **extension core** and the **webview**. The extension core acts as a proxy to the VSCode Engine and Artemis. The webview mainly has the purpose of displaying UI in the sidebar. The following further differentiate the purpose of each component

### Core

- running in a **node.js** environment
- communicates with the VSCode engine to handle the extension **lifecycle**, extension **settings**, extension **commands**
- communicates with the Artemis server to **authenticate**, **fetch and send data**
- holds the extensions **state**

The core is responsible for interacting with the VSCode engine. It handles basic extension functionality like settings, commands used by `CMD + SHIFT + P` and the extension lifecycle (activation and deactivation). The most important part of this functionality can be found in [src/extension.ts](src/extension.ts). \
The core also handles the communication with the Artemis server. It is responsible for authenticating the user, fetching and sending exercise data to the server. \
The webview can NOT communicate with the Artemis API directly due to CORS. Therefore all communication has to go through the core which acts as a proxy.
Scorpio is a Node.js-only VS Code extension (no webview). The source is in `src/` and consists of six modules:

### Webview
- `extension.ts` - Activation: loads Theia env, initializes settings, registers the restart command.
- `shared/settings.ts` - Reads and protects `scorpio.artemis.apiBaseUrl` and `scorpio.defaults.repoPath`.
- `theia/env-strategy.ts` - Two strategies for reading Theia environment variables: `ProcessEnvStrategy` and `DataBridgeStrategy`. Also parses the `GRADLE_PREWARM` level.
- `theia/theia.ts` - Auto-clone into workspace root with idempotence guard, git identity setup, and Gradle pre-warm trigger.
- `participation/cloning.service.ts` - Git clone operations with workspace-root path preservation.
- `participation/gradle.service.ts` - Background Gradle pre-warming after clone; skips non-Gradle repositories and Windows.

- running in a **browser environment** and hosting its own website
- built with **Angular** and support shared components with the Artemis webapp
- **communicates with the core via `postMessage`** calls (all possible commands are defined in the [shared/webview-commands.ts](shared/webview-commands.ts) file)
## Build

The webview is built with Angular to support shared components with the Artemis webapp. Examples how to use Angular in a VSCode webview can be found here: \
[https://github.com/4gray/vscode-webview-angular/tree/master](https://github.com/4gray/vscode-webview-angular/tree/master) \
[https://github.com/microsoft/vscode-webview-ui-toolkit-samples/tree/main/frameworks/hello-world-angular](https://github.com/microsoft/vscode-webview-ui-toolkit-samples/tree/main/frameworks/hello-world-angular) \
This allows us to use the same components in both the webapp and the extension. For now sharable components are implemented separately in each repository. The goal is to merge them both into the Artemis repository in the future. \
As the webview is running in a browser environment by hosting its own website, it is only possible to embed the webapp within an iframe. With that the extension falls under the CORS policy, preventing the webview from accessing the website properly. Use of the Artemis sameSite=Lax cookie is not possible (This can be also experienced in the VSCode integrated SimpleBroswer).

## Release a new version

The release workflow is similar to the one of the Orion plugin. Therefore don't be confused by the different names in the images. The release process is as follows:

![](.github/media/home_to_release.png)

1. Go to the GitHub `Releases` in the `scorpio` repository
2. Click on `Draft a new release`

![](.github/media/releases_list.png)

3. Choose as a tag the new version number to release (e.g. tag version `v1.5.0` releases the version `1.5.0`)
4. Let the release notes be auto-generated by clicking `Generate release notes`

![](.github/media/create_release.png)

5. An admin now has to review and accept the new release
6. After the release is approved, GitHub will automatically build and upload the artifact as well as publish the new version to the marketplace.

The latest plugin artifact is now available on GitHub and via the VS Code marketplace.
```bash
npm install
npm run build # webpack production build
npm run watch # webpack watch mode
npm run lint # eslint
npm run package # vsce package
```

**It might take some time for the latest version to be seen on the marketplace since VS Code still has to review
and approve the changes!**
## Release

![](.github/media/release.gif)
1. Go to GitHub Releases in the scorpio repository
2. Click "Draft a new release"
3. Choose a tag with the new version number (e.g. `v1.5.0`)
4. Generate release notes automatically
5. An admin reviews and approves the release
6. GitHub builds, uploads the artifact, and publishes to the marketplace
21 changes: 18 additions & 3 deletions README_THEIA.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
## Features
# Theia/EduIDE Features

**Automatic Authentication**
Scorpio is primarily designed for Theia/EduIDE environments. All core features (auto-clone, git identity, env loading, settings protection) activate automatically when running in Theia.

**Automatic Exercise Cloning**
## Environment Variables

Scorpio reads the following variables from the Theia environment:

| Variable | Required | Purpose |
| ---------------- | -------- | ------------------------------------------------------------------- |
| `ARTEMIS_URL` | Yes | Artemis server base URL |
| `GIT_URI` | Yes | Repository URL to clone |
| `GIT_USER` | No | Git username (falls back to hostname) |
| `GIT_MAIL` | No | Git email (falls back to `<username>@artemis-theia.de`) |
| `THEIA` | No | Explicit Theia flag (auto-detected via DataBridge) |
| `GRADLE_PREWARM` | No | Gradle pre-warm level: `off`, `daemon` (default), `deps`, or `full` |

## Environment Strategy

Set `SCORPIO_THEIA_ENV_STRATEGY=data-bridge` to use the DataBridge extension (`tum-aet.data-bridge`) for environment variable loading. Otherwise, process environment variables are read directly.
Binary file removed media/artemis_logo.png
Binary file not shown.
10 changes: 0 additions & 10 deletions media/artemis_logo.svg

This file was deleted.

Binary file removed media/icon2.png
Binary file not shown.
Loading
Loading