forked from retoor/devplacepy
Update
This commit is contained in:
@@ -90,6 +90,7 @@ devplacepy/
|
||||
| `/reports` | Content reporting: `POST /reports/{target_type}/{target_uid}` files a report against any user-generated surface, `GET /reports/mine` lists the reports you filed and their outcome, `GET /reports/reasons` serves the reason registry so every client renders the same dialog |
|
||||
| `/admin/moderation` | Admin **Moderation** queue: reported content oldest-open-first with the response-window badge, one report per detail page with the offender's history, triage (`/status`) and decisions (`/decide`) |
|
||||
| `/workspaces/index` | Public index of every workspace published to the ingress proxy, with owner, project, maturity label and direct link |
|
||||
| `/projects/{slug}/workspace` | A member's dev workspace for a project: open/start/stop/delete, quota and idle status, public tunnels, and the **Editor** card holding their editor preferences (`GET`/`POST /projects/{slug}/workspace/editor`) |
|
||||
| `/block` | Block/unblock a user: hides all of their posts, comments and messages from you everywhere except their own profile, and stops them notifying you. Also reachable directly from every content action bar |
|
||||
| `/mute` | Mute/unmute a user: stops them creating notifications for you while their content stays visible |
|
||||
| `/leaderboard` | Contributor ranking by total stars earned |
|
||||
@@ -444,6 +445,51 @@ and its full configuration are documented automatically - including future servi
|
||||
|
||||
**Runtime data** (container workspaces and zip archives) lives in `DEVPLACE_DATA_DIR` (default `data/`), **outside the package and never served via `/static`**. The docker daemon must be able to bind-mount the data dir for `/app`.
|
||||
|
||||
### Dev Workspaces and the browser editor
|
||||
|
||||
A **workspace** is a member-facing container running the DevPlace browser editor, layered on the
|
||||
container runtime above. It is opened from a project's **Workspace** page and reached at
|
||||
`/projects/{slug}/workspace`; the editor itself is proxied at
|
||||
`/projects/{slug}/containers/instances/{uid}/code/`, and an **Editor** button appears on the project
|
||||
page whenever the workspace is running.
|
||||
|
||||
The editor is `code-server`, rebranded as DevPlace end to end: the application name, the browser tab
|
||||
icon and PWA icons, the login page styling, and `product.json` all carry DevPlace, and a bundled
|
||||
built-in extension ships the **DevPlace Dark** and **DevPlace Light** themes (generated from the
|
||||
site's own design tokens), a **Get started on DevPlace** walkthrough, a project status bar item and
|
||||
five `DevPlace:` commands. Nothing in the interface identifies as code-server.
|
||||
|
||||
**On boot** two terminals open: a focused **DevPlace Code** terminal already running `dpc`, the
|
||||
coding agent baked into the image, and a plain login shell beside it with the Python, Rust, Nim and
|
||||
Swift toolchains on `PATH`. Both are configurable, and `bash` stays the default profile for
|
||||
terminals the member opens later.
|
||||
|
||||
The workspace opens straight onto the member's files rather than a welcome page, and the editor's
|
||||
own built-in chat assistant is suppressed so `dpc` is the only agent on offer and every token it
|
||||
spends is ledgered against the member's DevPlace account. `dpc`'s own working files (`.dpc/`,
|
||||
`dpc.log`) are in `SYNC_SKIP_NAMES`, so running an agent on every boot never pollutes the project.
|
||||
|
||||
**Every workspace is trusted.** VS Code Restricted Mode is disabled at the command line and in the
|
||||
seeded settings, so nothing prompts and automatic tasks run. This is a deliberate default with a
|
||||
real consequence (a project's own `.vscode/tasks.json` will run on folder open), it is documented to
|
||||
members on `/docs/workspace-editor.html`, and an administrator can restore Restricted Mode site-wide
|
||||
with the `workspace_editor_trust_all` setting.
|
||||
|
||||
**Four sizes are configurable through one resolver.** Editor and terminal font size plus zoom, the
|
||||
editor layout and terminal panel preset, whether the editor opens in a tab or a sized window, and the
|
||||
container's CPU, memory and disk. The first three are the member's own preferences on their workspace
|
||||
page (and over the API, and through Devii's `workspace_editor_get` / `workspace_editor_set`); the
|
||||
container size is part of the administrator-set workspace quota. Each preference resolves instance
|
||||
override, then the member's row, then the site setting, then the built-in default, and the page shows
|
||||
which of those each value came from.
|
||||
|
||||
**A member edit is never overwritten.** DevPlace seeds the editor's `settings.json` from the host
|
||||
before each launch and records exactly what it wrote; on the next launch it updates only the keys
|
||||
whose current value is still the one it wrote. A setting the member changed inside the editor is
|
||||
theirs permanently, while a change to the site default still reaches everyone who has expressed no
|
||||
preference. Preferences apply on the next workspace start, and the page says so and offers the
|
||||
restart.
|
||||
|
||||
### Async job framework and zip downloads
|
||||
|
||||
`services/jobs/` is the standard way to run blocking work asynchronously and hand the caller a result URL. A shared `jobs` table is the queue (discriminated by `kind`); `queue.enqueue()` inserts a `pending` row from any worker, the lock-owning worker processes jobs in `JobService.run_once` (reap, recover orphans, refill up to a concurrency limit, prune expired), and status is polled from the database. Retention is built in: each job service deletes its own expired artifacts via a `cleanup` hook (default 7 days, admin-configurable). To add a kind, subclass `JobService`, set `kind`, and implement `process()` and `cleanup()`.
|
||||
|
||||
Reference in New Issue
Block a user