@bongos/core 1.19.249 → 1.19.251
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/.bongos-core.json +110 -30
- package/clients/bongos-client/README.md +1 -1
- package/clients/bongos-client/bongos-client.global.js +10 -0
- package/clients/bongos-client/index.cjs +10 -0
- package/clients/bongos-client/index.d.ts +14 -0
- package/clients/bongos-client/index.mjs +10 -0
- package/docs/adr/0178-the-copy-desk-flag-and-queue.md +131 -0
- package/docs/adr/README.md +1 -0
- package/docs/api/openapi.json +257 -3
- package/docs/api-reference.md +10 -1
- package/docs/copy-inventory.md +1430 -0
- package/docs/copy-registry.json +13293 -0
- package/docs/file-map.md +1 -0
- package/modules/copy-desk/CLAUDE.md +15 -0
- package/modules/copy-desk/flags.js +245 -0
- package/modules/copy-desk/migrations/copy_desk_001_flags.sql +128 -0
- package/modules/copy-desk/module.json +11 -0
- package/modules/copy-desk/registry.js +317 -0
- package/modules/copy-desk/routes/copy-desk.js +272 -0
- package/modules/copy-desk/tests/copy_flags.mjs +246 -0
- package/modules/copy-desk/tests/copy_no_cms.mjs +104 -0
- package/modules/copy-desk/tests/copy_queue.mjs +257 -0
- package/modules/dev-box/app/src/vendor/bongos-client.cjs +10 -0
- package/modules/hall-ui/public/copy-desk.css +119 -0
- package/modules/hall-ui/public/copy-desk.html +139 -0
- package/modules/hall-ui/public/copy-desk.js +352 -0
- package/modules/hall-ui/public/shell.js +9 -0
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/scripts/gds/publish-manifest.js +9 -0
- package/scripts/gds/run-unit-tests.js +11 -1
- package/src/bongos/module-scope-map.js +17 -0
- package/src/bongos/serve-internal.js +11 -1
- package/src/module-api.js +5 -1
- package/tests/copy_desk_flags_db.mjs +250 -0
- package/tests/hall_nav.mjs +7 -1
- package/tests/module_loader.mjs +5 -2
- package/tests/publish_manifest.mjs +82 -0
package/docs/api/openapi.json
CHANGED
|
@@ -73,6 +73,10 @@
|
|
|
73
73
|
"name": "claims",
|
|
74
74
|
"description": "Endpoints under `/api/bongos/claims`."
|
|
75
75
|
},
|
|
76
|
+
{
|
|
77
|
+
"name": "copy-desk",
|
|
78
|
+
"description": "Endpoints under `/api/bongos/copy-desk`."
|
|
79
|
+
},
|
|
76
80
|
{
|
|
77
81
|
"name": "cost",
|
|
78
82
|
"description": "Endpoints under `/api/bongos/cost`."
|
|
@@ -3179,6 +3183,180 @@
|
|
|
3179
3183
|
]
|
|
3180
3184
|
}
|
|
3181
3185
|
},
|
|
3186
|
+
"/copy-desk/flags": {
|
|
3187
|
+
"post": {
|
|
3188
|
+
"operationId": "post_copy_desk_flags",
|
|
3189
|
+
"tags": [
|
|
3190
|
+
"copy-desk"
|
|
3191
|
+
],
|
|
3192
|
+
"summary": "POST /copy-desk/flags",
|
|
3193
|
+
"description": "------------------------------------------------------------------------- POST /copy-desk/flags — file a flag. Body: { scope, surface, string_id?, reason, kind? } rank: any signed-in builder (see the header). -------------------------------------------------------------------------\n\n**Rank:** `any-builder` — Any authenticated builder (row-level ownership enforced in-handler).",
|
|
3194
|
+
"x-rank": "any-builder",
|
|
3195
|
+
"x-source": "modules/copy-desk/routes/copy-desk.js",
|
|
3196
|
+
"requestBody": {
|
|
3197
|
+
"required": true,
|
|
3198
|
+
"content": {
|
|
3199
|
+
"application/json": {
|
|
3200
|
+
"schema": {
|
|
3201
|
+
"$ref": "#/components/schemas/PostCopyDeskFlagsRequest"
|
|
3202
|
+
}
|
|
3203
|
+
}
|
|
3204
|
+
},
|
|
3205
|
+
"x-validated": true
|
|
3206
|
+
},
|
|
3207
|
+
"responses": {
|
|
3208
|
+
"200": {
|
|
3209
|
+
"description": "Success.",
|
|
3210
|
+
"content": {
|
|
3211
|
+
"application/json": {
|
|
3212
|
+
"schema": {
|
|
3213
|
+
"$ref": "#/components/schemas/PostCopyDeskFlagsResponse"
|
|
3214
|
+
}
|
|
3215
|
+
}
|
|
3216
|
+
}
|
|
3217
|
+
},
|
|
3218
|
+
"400": {
|
|
3219
|
+
"$ref": "#/components/responses/ValidationFailed"
|
|
3220
|
+
},
|
|
3221
|
+
"401": {
|
|
3222
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
3223
|
+
},
|
|
3224
|
+
"403": {
|
|
3225
|
+
"$ref": "#/components/responses/Forbidden"
|
|
3226
|
+
}
|
|
3227
|
+
},
|
|
3228
|
+
"security": [
|
|
3229
|
+
{
|
|
3230
|
+
"builderSession": []
|
|
3231
|
+
}
|
|
3232
|
+
]
|
|
3233
|
+
}
|
|
3234
|
+
},
|
|
3235
|
+
"/copy-desk/flags/{id}/close": {
|
|
3236
|
+
"post": {
|
|
3237
|
+
"operationId": "post_copy_desk_flags_id_close",
|
|
3238
|
+
"tags": [
|
|
3239
|
+
"copy-desk"
|
|
3240
|
+
],
|
|
3241
|
+
"summary": "POST /copy-desk/flags/:id/close",
|
|
3242
|
+
"description": "------------------------------------------------------------------------- POST /copy-desk/flags/:id/close — resolve or dismiss. Body: { status: 'resolved'|'dismissed', resolution_note, resolved_task_id? } rank: metic+archon, OR the flag's author (see the header). -------------------------------------------------------------------------\n\n**Rank:** `any-builder` — Any authenticated builder (row-level ownership enforced in-handler).",
|
|
3243
|
+
"x-rank": "any-builder",
|
|
3244
|
+
"x-source": "modules/copy-desk/routes/copy-desk.js",
|
|
3245
|
+
"parameters": [
|
|
3246
|
+
{
|
|
3247
|
+
"name": "id",
|
|
3248
|
+
"in": "path",
|
|
3249
|
+
"required": true,
|
|
3250
|
+
"schema": {
|
|
3251
|
+
"type": "string"
|
|
3252
|
+
},
|
|
3253
|
+
"description": "Path parameter `id`."
|
|
3254
|
+
}
|
|
3255
|
+
],
|
|
3256
|
+
"requestBody": {
|
|
3257
|
+
"required": true,
|
|
3258
|
+
"content": {
|
|
3259
|
+
"application/json": {
|
|
3260
|
+
"schema": {
|
|
3261
|
+
"$ref": "#/components/schemas/PostCopyDeskFlagsIdCloseRequest"
|
|
3262
|
+
}
|
|
3263
|
+
}
|
|
3264
|
+
},
|
|
3265
|
+
"x-validated": true
|
|
3266
|
+
},
|
|
3267
|
+
"responses": {
|
|
3268
|
+
"200": {
|
|
3269
|
+
"description": "Success.",
|
|
3270
|
+
"content": {
|
|
3271
|
+
"application/json": {
|
|
3272
|
+
"schema": {
|
|
3273
|
+
"$ref": "#/components/schemas/PostCopyDeskFlagsIdCloseResponse"
|
|
3274
|
+
}
|
|
3275
|
+
}
|
|
3276
|
+
}
|
|
3277
|
+
},
|
|
3278
|
+
"400": {
|
|
3279
|
+
"$ref": "#/components/responses/ValidationFailed"
|
|
3280
|
+
},
|
|
3281
|
+
"401": {
|
|
3282
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
3283
|
+
},
|
|
3284
|
+
"403": {
|
|
3285
|
+
"$ref": "#/components/responses/Forbidden"
|
|
3286
|
+
},
|
|
3287
|
+
"404": {
|
|
3288
|
+
"$ref": "#/components/responses/NotFound"
|
|
3289
|
+
}
|
|
3290
|
+
},
|
|
3291
|
+
"security": [
|
|
3292
|
+
{
|
|
3293
|
+
"builderSession": []
|
|
3294
|
+
}
|
|
3295
|
+
]
|
|
3296
|
+
}
|
|
3297
|
+
},
|
|
3298
|
+
"/copy-desk/queue": {
|
|
3299
|
+
"get": {
|
|
3300
|
+
"operationId": "get_copy_desk_queue",
|
|
3301
|
+
"tags": [
|
|
3302
|
+
"copy-desk"
|
|
3303
|
+
],
|
|
3304
|
+
"summary": "GET /copy-desk/queue",
|
|
3305
|
+
"description": "------------------------------------------------------------------------- GET /copy-desk/queue — the artist's working list. ?status=open (default) | resolved | dismissed | all ?surface=<registry surface id> rank: any signed-in builder. The queue is a work list, not a privilege — and an artist is a craft, not a rank (builders.preferred_disciplines), so gating this by rank would hide the artist's own queue from the artist. -------------------------------------------------------------------------\n\n**Rank:** `any-builder` — Any authenticated builder (row-level ownership enforced in-handler).",
|
|
3306
|
+
"x-rank": "any-builder",
|
|
3307
|
+
"x-source": "modules/copy-desk/routes/copy-desk.js",
|
|
3308
|
+
"responses": {
|
|
3309
|
+
"200": {
|
|
3310
|
+
"description": "Success."
|
|
3311
|
+
},
|
|
3312
|
+
"400": {
|
|
3313
|
+
"$ref": "#/components/responses/BadRequest"
|
|
3314
|
+
},
|
|
3315
|
+
"401": {
|
|
3316
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
3317
|
+
},
|
|
3318
|
+
"403": {
|
|
3319
|
+
"$ref": "#/components/responses/Forbidden"
|
|
3320
|
+
}
|
|
3321
|
+
},
|
|
3322
|
+
"security": [
|
|
3323
|
+
{
|
|
3324
|
+
"builderSession": []
|
|
3325
|
+
}
|
|
3326
|
+
]
|
|
3327
|
+
}
|
|
3328
|
+
},
|
|
3329
|
+
"/copy-desk/strings": {
|
|
3330
|
+
"get": {
|
|
3331
|
+
"operationId": "get_copy_desk_strings",
|
|
3332
|
+
"tags": [
|
|
3333
|
+
"copy-desk"
|
|
3334
|
+
],
|
|
3335
|
+
"summary": "GET /copy-desk/strings",
|
|
3336
|
+
"description": "------------------------------------------------------------------------- GET /copy-desk/strings — search the inventory, to find something to flag. ?q= substring over text or file path · ?surface= · ?limit= (max 200) Read-only over the committed registry — no DB, no tree walk. rank: any signed-in builder, same reasoning as the queue. -------------------------------------------------------------------------\n\n**Rank:** `any-builder` — Any authenticated builder (row-level ownership enforced in-handler).",
|
|
3337
|
+
"x-rank": "any-builder",
|
|
3338
|
+
"x-source": "modules/copy-desk/routes/copy-desk.js",
|
|
3339
|
+
"responses": {
|
|
3340
|
+
"200": {
|
|
3341
|
+
"description": "Success."
|
|
3342
|
+
},
|
|
3343
|
+
"400": {
|
|
3344
|
+
"$ref": "#/components/responses/BadRequest"
|
|
3345
|
+
},
|
|
3346
|
+
"401": {
|
|
3347
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
3348
|
+
},
|
|
3349
|
+
"403": {
|
|
3350
|
+
"$ref": "#/components/responses/Forbidden"
|
|
3351
|
+
}
|
|
3352
|
+
},
|
|
3353
|
+
"security": [
|
|
3354
|
+
{
|
|
3355
|
+
"builderSession": []
|
|
3356
|
+
}
|
|
3357
|
+
]
|
|
3358
|
+
}
|
|
3359
|
+
},
|
|
3182
3360
|
"/cost": {
|
|
3183
3361
|
"post": {
|
|
3184
3362
|
"operationId": "post_cost",
|
|
@@ -15494,6 +15672,82 @@
|
|
|
15494
15672
|
"reward"
|
|
15495
15673
|
]
|
|
15496
15674
|
},
|
|
15675
|
+
"PostCopyDeskFlagsIdCloseRequest": {
|
|
15676
|
+
"type": "object",
|
|
15677
|
+
"properties": {
|
|
15678
|
+
"status": {
|
|
15679
|
+
"type": "string"
|
|
15680
|
+
},
|
|
15681
|
+
"resolution_note": {
|
|
15682
|
+
"type": "string",
|
|
15683
|
+
"minLength": 1
|
|
15684
|
+
},
|
|
15685
|
+
"resolved_task_id": {
|
|
15686
|
+
"type": "integer",
|
|
15687
|
+
"minimum": 1
|
|
15688
|
+
}
|
|
15689
|
+
},
|
|
15690
|
+
"required": [
|
|
15691
|
+
"status",
|
|
15692
|
+
"resolution_note"
|
|
15693
|
+
],
|
|
15694
|
+
"additionalProperties": false
|
|
15695
|
+
},
|
|
15696
|
+
"PostCopyDeskFlagsIdCloseResponse": {
|
|
15697
|
+
"type": "object",
|
|
15698
|
+
"properties": {
|
|
15699
|
+
"ok": {
|
|
15700
|
+
"type": "boolean"
|
|
15701
|
+
},
|
|
15702
|
+
"flag": {}
|
|
15703
|
+
},
|
|
15704
|
+
"required": [
|
|
15705
|
+
"ok",
|
|
15706
|
+
"flag"
|
|
15707
|
+
]
|
|
15708
|
+
},
|
|
15709
|
+
"PostCopyDeskFlagsRequest": {
|
|
15710
|
+
"type": "object",
|
|
15711
|
+
"properties": {
|
|
15712
|
+
"scope": {
|
|
15713
|
+
"type": "string"
|
|
15714
|
+
},
|
|
15715
|
+
"surface": {
|
|
15716
|
+
"type": "string",
|
|
15717
|
+
"minLength": 1,
|
|
15718
|
+
"maxLength": 128
|
|
15719
|
+
},
|
|
15720
|
+
"string_id": {
|
|
15721
|
+
"type": "string",
|
|
15722
|
+
"maxLength": 64
|
|
15723
|
+
},
|
|
15724
|
+
"reason": {
|
|
15725
|
+
"type": "string",
|
|
15726
|
+
"minLength": 1
|
|
15727
|
+
},
|
|
15728
|
+
"kind": {
|
|
15729
|
+
"type": "string"
|
|
15730
|
+
}
|
|
15731
|
+
},
|
|
15732
|
+
"required": [
|
|
15733
|
+
"surface",
|
|
15734
|
+
"reason"
|
|
15735
|
+
],
|
|
15736
|
+
"additionalProperties": false
|
|
15737
|
+
},
|
|
15738
|
+
"PostCopyDeskFlagsResponse": {
|
|
15739
|
+
"type": "object",
|
|
15740
|
+
"properties": {
|
|
15741
|
+
"ok": {
|
|
15742
|
+
"type": "boolean"
|
|
15743
|
+
},
|
|
15744
|
+
"flag": {}
|
|
15745
|
+
},
|
|
15746
|
+
"required": [
|
|
15747
|
+
"ok",
|
|
15748
|
+
"flag"
|
|
15749
|
+
]
|
|
15750
|
+
},
|
|
15497
15751
|
"PostCostRequest": {
|
|
15498
15752
|
"type": "object",
|
|
15499
15753
|
"properties": {
|
|
@@ -18039,9 +18293,9 @@
|
|
|
18039
18293
|
"description": "A required dependency/feature is not configured or is temporarily down."
|
|
18040
18294
|
}
|
|
18041
18295
|
},
|
|
18042
|
-
"x-endpoint-count":
|
|
18043
|
-
"x-schema-count":
|
|
18296
|
+
"x-endpoint-count": 289,
|
|
18297
|
+
"x-schema-count": 325,
|
|
18044
18298
|
"x-undocumented-bodies": 8,
|
|
18045
|
-
"x-response-schemas":
|
|
18299
|
+
"x-response-schemas": 217,
|
|
18046
18300
|
"x-generated-by": "scripts/gds/gen-api-docs.js"
|
|
18047
18301
|
}
|
package/docs/api-reference.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# Bongos API reference
|
|
4
4
|
|
|
5
|
-
> **Generated from the live route files** — the route file is authoritative.
|
|
5
|
+
> **Generated from the live route files** — the route file is authoritative. 289 endpoints across 47 route files.
|
|
6
6
|
> Machine-readable spec: [`docs/api/openapi.json`](api/openapi.json) (OpenAPI 3.1). Rendered docs site: **`/docs`** (e.g. `cloudbongos.com/docs`).
|
|
7
7
|
|
|
8
8
|
Base path: `/api/bongos`. Ranks (enforced server-side, [ADR 0016](adr/<redacted>.md)): `public` < `any-builder` < `metic+archon` < `archon`.
|
|
@@ -143,6 +143,15 @@ Base path: `/api/bongos`. Ranks (enforced server-side, [ADR 0016](adr/<redacted>
|
|
|
143
143
|
| POST | `/api/bongos/claims/batch/release` | `any-builder` | `claim_ids`, `force` | Bulk release (task 1758) — the batch twin of resolve(outcome='abandoned'). |
|
|
144
144
|
| POST | `/api/bongos/claims/batch/validate` | `any-builder` | `task_ids` | Dry-run validate (task 1758) — read-only twin of claimTasksBatch's pre-flight checks. |
|
|
145
145
|
|
|
146
|
+
## `copy-desk` (4)
|
|
147
|
+
|
|
148
|
+
| Method | Path | Rank | Body | Description |
|
|
149
|
+
|---|---|---|---|---|
|
|
150
|
+
| POST | `/api/bongos/copy-desk/flags` | `any-builder` | `scope`, `surface`, `string_id`, `reason`, `kind` | ------------------------------------------------------------------------- POST /copy-desk/flags — file a flag. |
|
|
151
|
+
| POST | `/api/bongos/copy-desk/flags/:id/close` | `any-builder` | `status`, `resolution_note`, `resolved_task_id` | ------------------------------------------------------------------------- POST /copy-desk/flags/:id/close — resolve or dismiss. |
|
|
152
|
+
| GET | `/api/bongos/copy-desk/queue` | `any-builder` | — | ------------------------------------------------------------------------- GET /copy-desk/queue — the artist's working list. |
|
|
153
|
+
| GET | `/api/bongos/copy-desk/strings` | `any-builder` | — | ------------------------------------------------------------------------- GET /copy-desk/strings — search the inventory, to find somethin… |
|
|
154
|
+
|
|
146
155
|
## `cost` (1)
|
|
147
156
|
|
|
148
157
|
| Method | Path | Rank | Body | Description |
|