wicked-crew-api-types 0.107.0 → 0.108.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +41 -7
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -10088,7 +10088,8 @@ export type EditorPermission =
|
|
|
10088
10088
|
* fetched at `entry_url` (`GET /editors/:id/:version/entry`, the §8.2 headers, re-hashed per serve).
|
|
10089
10089
|
* First-party editors ship inside studio's bundle (`<studio dist>/editors/<id>/editor.json` +
|
|
10090
10090
|
* `index.html`, ids `wicked-*`) and are discovered at boot; third-party editors arrive as garden
|
|
10091
|
-
* packs
|
|
10091
|
+
* packs (`source: 'pack'`), installed by the operator once garden's `pack check` and the
|
|
10092
|
+
* install-time conformance run have both passed.
|
|
10092
10093
|
*/
|
|
10093
10094
|
export interface EditorView {
|
|
10094
10095
|
id: string;
|
|
@@ -10107,20 +10108,52 @@ export interface EditorView {
|
|
|
10107
10108
|
bytes: number;
|
|
10108
10109
|
first_party: boolean;
|
|
10109
10110
|
enabled: boolean;
|
|
10110
|
-
|
|
10111
|
+
/** `studio-bundle`: first-party, shipped with studio. `pack`: a third-party pack the operator installed. */
|
|
10112
|
+
source: 'studio-bundle' | 'pack';
|
|
10111
10113
|
entry_url: string;
|
|
10112
10114
|
}
|
|
10113
10115
|
|
|
10114
10116
|
/** `GET /editors` (operator+). */
|
|
10115
10117
|
export interface ListEditorsResponse {
|
|
10116
10118
|
editors: EditorView[];
|
|
10117
|
-
/**
|
|
10118
|
-
|
|
10119
|
+
/** `conformance_required`: `POST /editors` installs a pack only after garden's `pack check` and the
|
|
10120
|
+
* install-time conformance run pass (`refused_until_conformance` before the install surface: every install was refused). */
|
|
10121
|
+
installs: 'conformance_required' | 'refused_until_conformance';
|
|
10119
10122
|
}
|
|
10120
10123
|
|
|
10121
10124
|
/** `POST /editors` body (human-only): a pack directory holding `wicked-pack.json`. */
|
|
10122
10125
|
export interface InstallEditorBody {
|
|
10123
10126
|
packRoot: string;
|
|
10127
|
+
/** Install it on (the default; an update keeps the editor's current switch) or off. */
|
|
10128
|
+
enabled?: boolean;
|
|
10129
|
+
}
|
|
10130
|
+
|
|
10131
|
+
/** `POST /editors` → 200: the pack's editors are installed (or updated in place) and listed. */
|
|
10132
|
+
export interface InstallEditorResponse {
|
|
10133
|
+
installed: true;
|
|
10134
|
+
/** The pack was installed before; its editors were replaced (a new hash asks for its grants again). */
|
|
10135
|
+
updated: boolean;
|
|
10136
|
+
editors: EditorView[];
|
|
10137
|
+
check: PackCheckResult;
|
|
10138
|
+
conformance: EditorConformanceSummary;
|
|
10139
|
+
}
|
|
10140
|
+
|
|
10141
|
+
/** What the install-time conformance run found (garden `scripts/editor/conformance.py`). */
|
|
10142
|
+
export interface EditorConformanceSummary {
|
|
10143
|
+
ok: boolean;
|
|
10144
|
+
at: string;
|
|
10145
|
+
/** Per editor: the version and entry sha256 the run tested (an install requires both to be the installed ones). */
|
|
10146
|
+
editors: Array<{ id: string; version: string; sha256: string; ok: boolean; cases: Record<string, { ok: boolean }>; gaps: string[] }>;
|
|
10147
|
+
/** Set when the run could not happen (no headless browser, no garden with the runner). */
|
|
10148
|
+
error?: string;
|
|
10149
|
+
}
|
|
10150
|
+
|
|
10151
|
+
/** `POST /editors` → 422 when the conformance run failed or could not run (fail closed). */
|
|
10152
|
+
export interface InstallEditorNotConformant {
|
|
10153
|
+
code: 'editor_not_conformant' | 'conformance_unavailable';
|
|
10154
|
+
error: string;
|
|
10155
|
+
check: PackCheckResult;
|
|
10156
|
+
conformance: EditorConformanceSummary;
|
|
10124
10157
|
}
|
|
10125
10158
|
|
|
10126
10159
|
/** One finding of garden's `pack check --json`. */
|
|
@@ -10139,11 +10172,12 @@ export interface PackCheckResult {
|
|
|
10139
10172
|
}
|
|
10140
10173
|
|
|
10141
10174
|
/**
|
|
10142
|
-
* `POST /editors` → 501: the pack passed garden's gate
|
|
10143
|
-
*
|
|
10175
|
+
* `POST /editors` → 501: the pack passed garden's gate but also ships skills or blocks, whose own
|
|
10176
|
+
* approval (§3.2 "Add these") is not built yet; this is what it would ask the operator to approve.
|
|
10177
|
+
* Nothing was written. (`third_party_editors_not_available` before the install surface: every pack was refused.)
|
|
10144
10178
|
*/
|
|
10145
10179
|
export interface InstallEditorRefusal {
|
|
10146
|
-
code: 'third_party_editors_not_available';
|
|
10180
|
+
code: 'pack_ships_skills_or_blocks' | 'third_party_editors_not_available';
|
|
10147
10181
|
error: string;
|
|
10148
10182
|
check: PackCheckResult;
|
|
10149
10183
|
pack: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wicked-crew-api-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.108.0",
|
|
4
4
|
"description": "The wire contract of the wicked-crew daemon's /api/v1 REST surface and /ws CoreEvent frames \u2014 types only, zero runtime",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./index.d.ts",
|