wicked-crew-api-types 0.172.0 → 0.173.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 +42 -6
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -14830,7 +14830,11 @@ export interface AppTurnState {
|
|
|
14830
14830
|
|
|
14831
14831
|
/** `GET /apps` item. */
|
|
14832
14832
|
export interface AppSummary {
|
|
14833
|
-
/**
|
|
14833
|
+
/**
|
|
14834
|
+
* 1-48 characters, at most four words of `a-z 0-9` joined by `-`, starting with a letter
|
|
14835
|
+
* (`^[a-z][a-z0-9]*(-[a-z0-9]+){0,3}$`): the app repo's id in crew's repo registry is the slug itself.
|
|
14836
|
+
* `check` and `uploads` are reserved.
|
|
14837
|
+
*/
|
|
14834
14838
|
slug: string;
|
|
14835
14839
|
name: string;
|
|
14836
14840
|
projectId: string;
|
|
@@ -14879,9 +14883,9 @@ export interface AppDetailResponse {
|
|
|
14879
14883
|
export type AppEditOp = { op: 'spec'; spec: AppSpec } | { op: 'query-text'; query: string; text: string };
|
|
14880
14884
|
|
|
14881
14885
|
/**
|
|
14882
|
-
* `POST /apps/:app/edits` (HUMAN operator only): one `you` version from one edit burst (1-50 ops
|
|
14883
|
-
* is
|
|
14884
|
-
* edit is `409 turn_in_flight`.
|
|
14886
|
+
* `POST /apps/:app/edits` (HUMAN operator only): one `you` version from one edit burst (1-50 ops; the JSON
|
|
14887
|
+
* body is at most 12 MB, which holds a whole spec and 50 query texts). `base` is the head version the edit
|
|
14888
|
+
* was made on: a stale one is `409 stale_base`, and while a turn runs every edit is `409 turn_in_flight`.
|
|
14885
14889
|
*/
|
|
14886
14890
|
export interface AppEditsBody {
|
|
14887
14891
|
base: number;
|
|
@@ -14968,6 +14972,9 @@ export interface AppCheckFinding {
|
|
|
14968
14972
|
* accepted receipt for this app), `nothing_to_undo`, `nothing_to_redo`, `slug_taken` (with
|
|
14969
14973
|
* `suggestion`), `source_check_unavailable` (the tree has queries or actions and this daemon cannot
|
|
14970
14974
|
* run the source stage yet, so nothing lands);
|
|
14975
|
+
* - (api-types 0.173.0) 409 `unreadable_tree` (a tree crew landed no longer reads back from the app repo: the repo was changed);
|
|
14976
|
+
* - (api-types 0.173.0) the worker-facing `POST /apps/check` also answers 401 `invalid_token` and 409 `not_this_turn` (the token's
|
|
14977
|
+
* run is not the app's turn in flight); landing a turn refuses `not_checked` and `reviewer_not_distinct`;
|
|
14971
14978
|
* - 422 `check_failed` (with `findings`), `reserved_slug`;
|
|
14972
14979
|
* - 429 `rate_limited` (with `retryAfterMs`: a query queue or a per-viewer rate is full, DES §7.5);
|
|
14973
14980
|
* - 501 `not_implemented` (a route a later slice serves; nothing happened);
|
|
@@ -14992,6 +14999,11 @@ export interface AppErrorBody {
|
|
|
14992
14999
|
| 'reserved_slug'
|
|
14993
15000
|
| 'not_implemented'
|
|
14994
15001
|
| 'rate_limited'
|
|
15002
|
+
| 'unreadable_tree'
|
|
15003
|
+
| 'invalid_token'
|
|
15004
|
+
| 'not_this_turn'
|
|
15005
|
+
| 'not_checked'
|
|
15006
|
+
| 'reviewer_not_distinct'
|
|
14995
15007
|
| 'apps_unavailable';
|
|
14996
15008
|
error: string;
|
|
14997
15009
|
/** `rate_limited`: when to try again (also sent as `Retry-After`). */
|
|
@@ -15002,6 +15014,28 @@ export interface AppErrorBody {
|
|
|
15002
15014
|
suggestion?: string;
|
|
15003
15015
|
}
|
|
15004
15016
|
|
|
15017
|
+
/**
|
|
15018
|
+
* (api-types 0.173.0) `POST /apps/check` (worker-facing; the `apps_check` Tool runs `wicked-crew apps-check`, which sends the
|
|
15019
|
+
* unit's capability token in the body, never as a bearer): check the builder's candidate commit of the
|
|
15020
|
+
* app's turn in flight (DES §9.2 `check`).
|
|
15021
|
+
*/
|
|
15022
|
+
export interface AppsCheckBody {
|
|
15023
|
+
token: string;
|
|
15024
|
+
app: string;
|
|
15025
|
+
/** The builder's candidate commit in the app repo. */
|
|
15026
|
+
commit: string;
|
|
15027
|
+
/** The publish manifest, for the publish check (a later slice). */
|
|
15028
|
+
manifest?: unknown;
|
|
15029
|
+
}
|
|
15030
|
+
|
|
15031
|
+
/**
|
|
15032
|
+
* (api-types 0.173.0) `POST /apps/check` 200: on a pass, the commit crew made on the candidate with its lock (the only tree the
|
|
15033
|
+
* turn's review can land) and what the check ran; on a refusal, why.
|
|
15034
|
+
*/
|
|
15035
|
+
export type AppsCheckResponse =
|
|
15036
|
+
| { ok: true; commit: string; tree: string; summary: AppCheckSummary }
|
|
15037
|
+
| { ok: false; code: 'check_failed' | 'source_check_unavailable'; findings: AppCheckFinding[] };
|
|
15038
|
+
|
|
15005
15039
|
/**
|
|
15006
15040
|
* {@link HealthCapabilities.apps} (api-types 0.172.0): present when crew serves the app store
|
|
15007
15041
|
* (`/api/v1/apps`, list, add, read, edits, undo, redo, restore); each flag is true only once its slice
|
|
@@ -15025,8 +15059,10 @@ export interface AppsCapabilities {
|
|
|
15025
15059
|
/**
|
|
15026
15060
|
* `POST /repos` body. `create: true` (api-types 0.172.0, DES-APPS-001): crew makes `<apps root>/<name>`
|
|
15027
15061
|
* (`~/.wicked/apps` by default), runs `git init` with one empty commit and registers it; no onboarding
|
|
15028
|
-
* run starts (`onboardRunId: null`), and `rootPath`/`gitUrl` are refused beside it.
|
|
15029
|
-
* `
|
|
15062
|
+
* run starts (`onboardRunId: null`), and `rootPath`/`gitUrl` are refused beside it. With `create`, `name` is
|
|
15063
|
+
* an app slug ({@link AppSummary.slug}; `check` and `uploads` are `422 reserved_slug`). A name that is
|
|
15064
|
+
* taken (an app, a path under the apps root, or a registered repo id) is `409 slug_taken` with a
|
|
15065
|
+
* `suggestion`.
|
|
15030
15066
|
*/
|
|
15031
15067
|
export interface RegisterRepoBody {
|
|
15032
15068
|
name: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "wicked-crew-api-types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.173.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",
|