Document group project discovery and folder access for extensions
This commit is contained in:
@@ -481,6 +481,22 @@ The result contains active projects by default, ordered by most recent update, t
|
||||
|
||||
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_open_extension`
|
||||
|
||||
Use this command when someone selects a project action that belongs to another extension. The source needs the permissions for `projects_open_listed` plus `group_extensions_read`. Query `get_app_info().projectNavigation.commands` before offering navigation. The target needs the permissions for `projects_open_listed`.
|
||||
|
||||
```js
|
||||
await bridge.invoke('projects_open_extension', {
|
||||
projectId: session.project.id,
|
||||
extensionId: 'isa-match-rsx-to-quote',
|
||||
actionId: 'supplier'
|
||||
});
|
||||
```
|
||||
|
||||
Pass the canonical folder ID from the current project session, the target's manifest ID and its stable action key. Action keys start with an ASCII letter or digit and may contain letters, digits, periods, underscores, colons and hyphens, up to 128 characters. The host resolves the target from the source's current group, verifies the active project under both packages and supplies the verified project ID to the target. Desktop opens or focuses the target's dedicated extension window. The dashboard web UI opens a verified extension launch in the current shell. The response contains `status: 'opened'` and `requestId`.
|
||||
|
||||
The target subscribes to `bridge.on('project-navigation', handler)` before its first `get_app_info` request. It also reads `info.projectNavigation?.pending` on startup. Both supply `{ requestId, projectId, actionId }`. Deduplicate by request ID, recognize the action key, and open the project using the target's own session and ordinary unsaved-change handling. Use only recognized local routes. Project navigation should show the relevant work and leave any workflow mutation to an explicit user action.
|
||||
|
||||
### `projects_create`
|
||||
|
||||
Request:
|
||||
|
||||
Reference in New Issue
Block a user