Document direct access to listed extension projects
This commit is contained in:
@@ -53,8 +53,10 @@ The public filesystem command list is:
|
||||
The public shared-project command list is:
|
||||
|
||||
- `projects_list`
|
||||
- `projects_open_listed`
|
||||
- `projects_create`
|
||||
- `projects_set_archived`
|
||||
- `projects_set_group_link`
|
||||
|
||||
The atomic JSON command list is:
|
||||
|
||||
@@ -83,8 +85,10 @@ Common non-filesystem commands include:
|
||||
- `localstorage_delete`
|
||||
- `localstorage_list`
|
||||
- `projects_list`
|
||||
- `projects_open_listed`
|
||||
- `projects_create`
|
||||
- `projects_set_archived`
|
||||
- `projects_set_group_link`
|
||||
- `atomic_json_get`
|
||||
- `atomic_json_apply`
|
||||
- `upsert_document_snapshot`
|
||||
@@ -432,15 +436,7 @@ The extension does not request or follow a dashboard download link for syncable
|
||||
|
||||
## Shared Project Commands
|
||||
|
||||
These commands use the active launch group. Listing and creation require a
|
||||
dashboard advertising `shared-projects-v1`; archive and restore additionally
|
||||
require `shared-projects-archive-v1`. The host overwrites `workspaceId` and
|
||||
`groupId`; extensions cannot select another scope.
|
||||
|
||||
`get_app_info().projects` includes `enabled`, `canRead`, `canWrite`, and the available `commands`. `projects_read` enables
|
||||
`projects_list`; `projects_write` enables `projects_create` and
|
||||
`projects_set_archived`. Check the advertised command before rendering an
|
||||
archive or restore action.
|
||||
The host uses the workspace and group captured at launch. Check `get_app_info().projects.commands` for each action. Listing requires `projects_read`, and creating, archiving or managing a group link requires `projects_write`. The host checks access again when it grants or uses a project folder. [Project start screen](20-dashboard-backed-project-sync.md#project-start-screen)
|
||||
|
||||
### `projects_list`
|
||||
|
||||
@@ -462,7 +458,12 @@ Response:
|
||||
"status": "ok",
|
||||
"projects": [
|
||||
{
|
||||
"id": "shared-projects-project-...",
|
||||
"id": "isap-project-...",
|
||||
"folderId": "isap-project-...",
|
||||
"projectIdentity": "isap-project-...",
|
||||
"path": "/Projects/Renovatie West.isap",
|
||||
"manifestPath": "/Projects/Renovatie West.isap/project.json",
|
||||
"formatVersion": 1,
|
||||
"name": "Renovatie West",
|
||||
"createdAt": "2026-07-22T19:00:00Z",
|
||||
"updatedAt": "2026-07-22T19:00:00Z",
|
||||
@@ -474,14 +475,11 @@ Response:
|
||||
}
|
||||
```
|
||||
|
||||
Results are sorted by most recent `updatedAt`, then name and id. Timestamps are
|
||||
RFC 3339/ISO-8601 strings. The default response omits archived projects;
|
||||
`includeArchived: true` returns active and archived projects so clients can
|
||||
offer restore without mistaking an archived id for a deleted or unknown
|
||||
project. `archivedAt` is `null` for an active project. `canWrite` is false when
|
||||
the extension lacks `projects_write`; it permits the dedicated project write
|
||||
commands and association of extension-owned data, but never raw mutation of the
|
||||
registry folder through the filesystem API.
|
||||
The result contains active projects by default, ordered by most recent update, then name and ID. Pass `includeArchived: true` to include archived entries. Each row includes a canonical folder reference, RFC 3339 timestamps, archive state and a `canWrite` flag. Reading folder contents requires a valid grant for that project.
|
||||
|
||||
### `projects_open_listed`
|
||||
|
||||
For a click on a project row, call `bridge.invoke('projects_open_listed', { projectId: row.id })`. The installed extension must declare `projects_read`, `filesystem_read` and `projects_open_listed`. Check the command in `get_app_info().projects.commands`. The host resolves the ID in the authenticated launch group and returns the current folder reference and access grant. An archived or unlinked project, revoked access, or a failed read leaves the overview open. Older extensions that call the retired `projects_open` command receive `{ status: "cancelled", project: null }`.
|
||||
|
||||
### `projects_create`
|
||||
|
||||
@@ -489,18 +487,19 @@ Request:
|
||||
|
||||
```json
|
||||
{
|
||||
"name": "Renovatie West"
|
||||
"name": "Renovatie West",
|
||||
"operationId": "726af7e3-142b-44f5-90a3-89ea4b3f9b3f"
|
||||
}
|
||||
```
|
||||
|
||||
Response:
|
||||
The response includes the granted project reference and whether the call created it. Example fields follow.
|
||||
|
||||
```json
|
||||
{
|
||||
"status": "ok",
|
||||
"created": true,
|
||||
"project": {
|
||||
"id": "shared-projects-project-...",
|
||||
"id": "isap-project-...",
|
||||
"name": "Renovatie West",
|
||||
"createdAt": "2026-07-22T19:00:00Z",
|
||||
"updatedAt": "2026-07-22T19:00:00Z",
|
||||
@@ -511,24 +510,17 @@ Response:
|
||||
}
|
||||
```
|
||||
|
||||
The name is trimmed, case-sensitive, and limited to 160 characters and 512
|
||||
UTF-8 bytes. Empty names, traversal segments, separators, and control
|
||||
characters are rejected. Repeating the same canonical create returns the same
|
||||
project with `created: false`; no duplicate folder is made. A group supports at
|
||||
most 500 projects, including archived entries. Creating with the name of an
|
||||
archived project returns that same archived identity; use
|
||||
`projects_set_archived` to restore it explicitly.
|
||||
Use the same `name` and `operationId` when retrying a single creation. A successful retry returns the existing project with `created: false`. A new operation targeting a name already in use can fail. Names must be safe folder names, at most 160 UTF-16 code units and 512 UTF-8 bytes. A group supports up to 500 projects.
|
||||
|
||||
### `projects_set_archived`
|
||||
|
||||
This soft-archives or restores a project without deleting its registry identity
|
||||
or any extension-owned data.
|
||||
This command changes the archive state of the shared project.
|
||||
|
||||
Archive request:
|
||||
|
||||
```json
|
||||
{
|
||||
"projectId": "shared-projects-project-...",
|
||||
"projectId": "isap-project-...",
|
||||
"archived": true
|
||||
}
|
||||
```
|
||||
@@ -540,7 +532,7 @@ Response:
|
||||
"status": "ok",
|
||||
"changed": true,
|
||||
"project": {
|
||||
"id": "shared-projects-project-...",
|
||||
"id": "isap-project-...",
|
||||
"name": "Renovatie West",
|
||||
"createdAt": "2026-07-22T19:00:00Z",
|
||||
"updatedAt": "2026-07-23T09:00:00Z",
|
||||
@@ -551,16 +543,7 @@ Response:
|
||||
}
|
||||
```
|
||||
|
||||
Restore the project by sending the same `projectId` with `archived: false`.
|
||||
Both transitions are idempotent: requesting the current state returns
|
||||
`changed: false`. The project id, name, parent, and canonical path remain
|
||||
unchanged. Files and records stored by extensions under their own group folders
|
||||
are not moved or removed.
|
||||
|
||||
The project id is a stable foreign key shared by extensions. Project registry
|
||||
folders are system-owned, read-only metadata and cannot be used as raw
|
||||
extension storage. Persist extension-owned files under the extension's group
|
||||
folder and include the project id in their schema or metadata.
|
||||
Restore the project by sending the same `projectId` with `archived: false`. Repeating the current state returns `changed: false`. Archiving preserves the project’s stable folder identity and its contents, including the data saved by other extensions.
|
||||
|
||||
## Audio Capture Commands
|
||||
|
||||
|
||||
Reference in New Issue
Block a user