@bongos/core 1.21.167 → 1.21.169

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.
Files changed (83) hide show
  1. package/.bongos-core.json +157 -72
  2. package/clients/bongos-client/README.md +1 -1
  3. package/clients/bongos-client/bongos-client.global.js +8 -0
  4. package/clients/bongos-client/index.cjs +8 -0
  5. package/clients/bongos-client/index.d.ts +13 -0
  6. package/clients/bongos-client/index.mjs +8 -0
  7. package/docs/api/openapi.json +308 -5
  8. package/docs/api-reference.md +7 -3
  9. package/docs/architecture.md +2 -0
  10. package/docs/copy-inventory.md +21 -20
  11. package/docs/copy-registry.json +34 -25
  12. package/docs/module-api-changelog.md +5 -1
  13. package/docs/modules-contract.md +2 -1
  14. package/docs/page-inventory.json +3 -0
  15. package/docs/page-readings.json +430 -430
  16. package/modules/autonomy/governor-docket.js +10 -5
  17. package/modules/builder-settings/builder-needs.js +29 -3
  18. package/modules/copy-desk/guarded-lines.js +89 -0
  19. package/modules/copy-desk/guarded-lines.json +14 -0
  20. package/modules/copy-desk/module.json +2 -2
  21. package/modules/copy-desk/page-status.js +77 -7
  22. package/modules/copy-desk/pages.js +4 -0
  23. package/modules/copy-desk/pollers/stuck-page-digest.js +34 -0
  24. package/modules/copy-desk/routes/copy-desk.js +8 -0
  25. package/modules/copy-desk/stuck-tweaks.js +79 -0
  26. package/modules/copy-desk/tests/copy_no_cms.mjs +6 -1
  27. package/modules/copy-desk/tests/copy_page_status.mjs +2 -2
  28. package/modules/government/asks-db.js +38 -2
  29. package/modules/government/catalog.js +1 -1
  30. package/modules/government/docket.js +20 -2
  31. package/modules/government/migrations/government_032_ask_flags.sql +35 -0
  32. package/modules/government/routes/government.js +43 -1
  33. package/modules/hall-ui/public/approval-queue-lib.js +4 -0
  34. package/modules/hall-ui/public/approval-queue.js +1 -0
  35. package/modules/hall-ui/public/city-decide.js +642 -0
  36. package/modules/hall-ui/public/city-draw.js +14 -3
  37. package/modules/hall-ui/public/city-switchboard.js +141 -0
  38. package/modules/hall-ui/public/city.css +176 -10
  39. package/modules/hall-ui/public/city.html +8 -3
  40. package/modules/hall-ui/public/city.js +185 -38
  41. package/modules/hall-ui/public/tweak-editor-lib.js +21 -2
  42. package/modules/hall-ui/public/tweak-editor.css +2 -0
  43. package/modules/hall-ui/public/tweak-editor.js +3 -1
  44. package/modules/lifecycle/db-claims.js +20 -5
  45. package/modules/lifecycle/rebase-gate.js +78 -0
  46. package/modules/lifecycle/routes/claims.js +10 -2
  47. package/package-lock.json +2 -2
  48. package/package.json +1 -1
  49. package/release-notes.json +28 -0
  50. package/scripts/gds/ask.js +68 -1
  51. package/scripts/gds/claim.js +6 -1
  52. package/scripts/gds/copy-apply.js +2 -0
  53. package/src/bongos/module-promotion.js +219 -0
  54. package/src/bongos/module-store.js +47 -9
  55. package/src/bongos/route-rank-check.js +7 -0
  56. package/src/bongos/routes/me.js +11 -0
  57. package/src/bongos/routes/modules.js +72 -10
  58. package/src/module-api.js +1 -1
  59. package/src/platform-server.js +5 -0
  60. package/tests/claim_gate_ci_unblock.mjs +4 -0
  61. package/tests/claim_gate_rebase.mjs +56 -3
  62. package/tests/copy_desk_page_editor.mjs +1 -1
  63. package/tests/copy_desk_page_submit.mjs +42 -0
  64. package/tests/copy_guarded_lines.mjs +54 -0
  65. package/tests/copy_stuck_page_tweaks.mjs +118 -0
  66. package/tests/government_ask_flags.mjs +80 -0
  67. package/tests/government_seed.mjs +1 -0
  68. package/tests/government_treasury.mjs +1 -0
  69. package/tests/governor_docket.mjs +1 -1
  70. package/tests/hall_approval_queue.mjs +15 -0
  71. package/tests/hall_city.mjs +5 -4
  72. package/tests/hall_city_living.mjs +118 -12
  73. package/tests/hall_city_rewording.mjs +51 -0
  74. package/tests/hall_city_switchboard.mjs +63 -0
  75. package/tests/hall_gov_real_site.mjs +2 -2
  76. package/tests/hall_street_deck.mjs +6 -4
  77. package/tests/hall_street_depth.mjs +1 -1
  78. package/tests/hall_street_desk.mjs +5 -3
  79. package/tests/hall_tweak_editor.mjs +26 -0
  80. package/tests/module_channel_install.mjs +112 -0
  81. package/tests/module_promotion.mjs +290 -0
  82. package/tests/module_upgrade_updates.mjs +2 -2
  83. package/tests/rebase_gate_set_aside.mjs +73 -0
@@ -5,7 +5,7 @@ A **generated**, zero-dependency typed client for the Bongos API — produced fr
5
5
  by hand; it regenerates when the spec changes, so it can never drift from the routes.
6
6
 
7
7
  - API version: **v1** (served at `/api/bongos/v1`)
8
- - 568 operations across 76 resource groups
8
+ - 572 operations across 76 resource groups
9
9
 
10
10
  ## Use it from your project
11
11
 
@@ -505,8 +505,12 @@ function createClient(opts = {}) {
505
505
  putGovernmentAsksMatterId: (args) => request("PUT", "/government/asks/{matterId}", { hasBody: true }, args),
506
506
  // POST /government/asks/{matterId}/pass — rank: any-builder — POST /government/asks/:matterId/pass
507
507
  postGovernmentAsksMatterIdPass: (args) => request("POST", "/government/asks/{matterId}/pass", { hasBody: true }, args),
508
+ // POST /government/asks/{matterId}/unclear — rank: any-builder — POST /government/asks/:matterId/unclear
509
+ postGovernmentAsksMatterIdUnclear: (args) => request("POST", "/government/asks/{matterId}/unclear", { hasBody: true }, args),
508
510
  // POST /government/asks/check — rank: any-builder — POST /government/asks/check
509
511
  postGovernmentAsksCheck: (args) => request("POST", "/government/asks/check", { hasBody: true }, args),
512
+ // GET /government/asks/unclear — rank: any-builder — GET /government/asks/unclear
513
+ getGovernmentAsksUnclear: (args) => request("GET", "/government/asks/unclear", { hasBody: false }, args),
510
514
  // GET /government/assignments — rank: archon — GET /government/assignments
511
515
  getGovernmentAssignments: (args) => request("GET", "/government/assignments", { hasBody: false }, args),
512
516
  // POST /government/assignments — rank: archon — POST /government/assignments
@@ -1239,6 +1243,8 @@ function createClient(opts = {}) {
1239
1243
  getStoreModulesKeyEntitlement: (args) => request("GET", "/store/modules/{key}/entitlement", { hasBody: false }, args),
1240
1244
  // POST /store/modules/{key}/versions — rank: metic+archon — POST /store/modules/:key/versions
1241
1245
  postStoreModulesKeyVersions: (args) => request("POST", "/store/modules/{key}/versions", { hasBody: true }, args),
1246
+ // GET /store/modules/{key}/versions/{version}/channel — rank: any-builder — GET /store/modules/:key/versions/:version/channel
1247
+ getStoreModulesKeyVersionsVersionChannel: (args) => request("GET", "/store/modules/{key}/versions/{version}/channel", { hasBody: false }, args),
1242
1248
  // POST /store/modules/{key}/versions/{version}/error-count — rank: any-builder — POST /store/modules/:key/versions/:version/error-count
1243
1249
  postStoreModulesKeyVersionsVersionErrorCount: (args) => request("POST", "/store/modules/{key}/versions/{version}/error-count", { hasBody: true }, args),
1244
1250
  // GET /store/modules/{key}/versions/{version}/howto — rank: any-builder — GET /store/modules/:key/versions/:version/howto
@@ -1247,6 +1253,8 @@ function createClient(opts = {}) {
1247
1253
  postStoreModulesKeyVersionsVersionInstallReport: (args) => request("POST", "/store/modules/{key}/versions/{version}/install-report", { hasBody: true }, args),
1248
1254
  // POST /store/modules/{key}/versions/{version}/reassess — rank: metic+archon — POST /store/modules/:key/versions/:version/reassess
1249
1255
  postStoreModulesKeyVersionsVersionReassess: (args) => request("POST", "/store/modules/{key}/versions/{version}/reassess", { hasBody: true }, args),
1256
+ // POST /store/modules/{key}/versions/{version}/release — rank: metic+archon — POST /store/modules/:key/versions/:version/release
1257
+ postStoreModulesKeyVersionsVersionRelease: (args) => request("POST", "/store/modules/{key}/versions/{version}/release", { hasBody: true }, args),
1250
1258
  // GET /store/modules/{key}/versions/{version}/tarball — rank: any-builder — GET /store/modules/:key/versions/:version/tarball
1251
1259
  getStoreModulesKeyVersionsVersionTarball: (args) => request("GET", "/store/modules/{key}/versions/{version}/tarball", { hasBody: false }, args),
1252
1260
  // GET /store/modules/latest — rank: any-builder — GET /store/modules/latest
@@ -504,8 +504,12 @@ function createClient(opts = {}) {
504
504
  putGovernmentAsksMatterId: (args) => request("PUT", "/government/asks/{matterId}", { hasBody: true }, args),
505
505
  // POST /government/asks/{matterId}/pass — rank: any-builder — POST /government/asks/:matterId/pass
506
506
  postGovernmentAsksMatterIdPass: (args) => request("POST", "/government/asks/{matterId}/pass", { hasBody: true }, args),
507
+ // POST /government/asks/{matterId}/unclear — rank: any-builder — POST /government/asks/:matterId/unclear
508
+ postGovernmentAsksMatterIdUnclear: (args) => request("POST", "/government/asks/{matterId}/unclear", { hasBody: true }, args),
507
509
  // POST /government/asks/check — rank: any-builder — POST /government/asks/check
508
510
  postGovernmentAsksCheck: (args) => request("POST", "/government/asks/check", { hasBody: true }, args),
511
+ // GET /government/asks/unclear — rank: any-builder — GET /government/asks/unclear
512
+ getGovernmentAsksUnclear: (args) => request("GET", "/government/asks/unclear", { hasBody: false }, args),
509
513
  // GET /government/assignments — rank: archon — GET /government/assignments
510
514
  getGovernmentAssignments: (args) => request("GET", "/government/assignments", { hasBody: false }, args),
511
515
  // POST /government/assignments — rank: archon — POST /government/assignments
@@ -1238,6 +1242,8 @@ function createClient(opts = {}) {
1238
1242
  getStoreModulesKeyEntitlement: (args) => request("GET", "/store/modules/{key}/entitlement", { hasBody: false }, args),
1239
1243
  // POST /store/modules/{key}/versions — rank: metic+archon — POST /store/modules/:key/versions
1240
1244
  postStoreModulesKeyVersions: (args) => request("POST", "/store/modules/{key}/versions", { hasBody: true }, args),
1245
+ // GET /store/modules/{key}/versions/{version}/channel — rank: any-builder — GET /store/modules/:key/versions/:version/channel
1246
+ getStoreModulesKeyVersionsVersionChannel: (args) => request("GET", "/store/modules/{key}/versions/{version}/channel", { hasBody: false }, args),
1241
1247
  // POST /store/modules/{key}/versions/{version}/error-count — rank: any-builder — POST /store/modules/:key/versions/:version/error-count
1242
1248
  postStoreModulesKeyVersionsVersionErrorCount: (args) => request("POST", "/store/modules/{key}/versions/{version}/error-count", { hasBody: true }, args),
1243
1249
  // GET /store/modules/{key}/versions/{version}/howto — rank: any-builder — GET /store/modules/:key/versions/:version/howto
@@ -1246,6 +1252,8 @@ function createClient(opts = {}) {
1246
1252
  postStoreModulesKeyVersionsVersionInstallReport: (args) => request("POST", "/store/modules/{key}/versions/{version}/install-report", { hasBody: true }, args),
1247
1253
  // POST /store/modules/{key}/versions/{version}/reassess — rank: metic+archon — POST /store/modules/:key/versions/:version/reassess
1248
1254
  postStoreModulesKeyVersionsVersionReassess: (args) => request("POST", "/store/modules/{key}/versions/{version}/reassess", { hasBody: true }, args),
1255
+ // POST /store/modules/{key}/versions/{version}/release — rank: metic+archon — POST /store/modules/:key/versions/:version/release
1256
+ postStoreModulesKeyVersionsVersionRelease: (args) => request("POST", "/store/modules/{key}/versions/{version}/release", { hasBody: true }, args),
1249
1257
  // GET /store/modules/{key}/versions/{version}/tarball — rank: any-builder — GET /store/modules/:key/versions/:version/tarball
1250
1258
  getStoreModulesKeyVersionsVersionTarball: (args) => request("GET", "/store/modules/{key}/versions/{version}/tarball", { hasBody: false }, args),
1251
1259
  // GET /store/modules/latest — rank: any-builder — GET /store/modules/latest
@@ -74,6 +74,7 @@ export interface GetGoalsIdRequestsResponse { requests: unknown }
74
74
  export interface GetGoalsIdResponse { goal: unknown; members: unknown; criteria: unknown; dependencies: unknown; criterionless_task_count: unknown; admitted: unknown; open_tasks: unknown }
75
75
  export interface GetGoalsResponse { goals: unknown }
76
76
  export interface GetGoalsRollupsResponse { rollups: unknown }
77
+ export interface GetGovernmentAsksUnclearResponse { ok: boolean; matters: unknown }
77
78
  export interface GetGovernmentAssignmentsResponse { assignments: unknown }
78
79
  export interface GetGovernmentPermissionsResponse { permissions: unknown; principals: unknown }
79
80
  export interface GetGovernmentRanksResponse { ranks: unknown }
@@ -373,6 +374,8 @@ export interface PostGoalsResponse { ok: boolean; goal: unknown; succeeds_goal_i
373
374
  export interface PostGovernmentAsksCheckResponse { ok: boolean; ask: unknown; question_words: unknown; rules: unknown }
374
375
  export interface PostGovernmentAsksMatterIdPassRequest { seat: string }
375
376
  export interface PostGovernmentAsksMatterIdPassResponse { ok: boolean; matter_id: unknown; ask: unknown; route: unknown }
377
+ export interface PostGovernmentAsksMatterIdUnclearRequest { note?: string }
378
+ export interface PostGovernmentAsksMatterIdUnclearResponse { ok: boolean; matter_id: unknown; flag: unknown }
376
379
  export interface PostGovernmentAssignmentsRequest { builder_id: number; rank_key: string }
377
380
  export interface PostGovernmentBoardCharterRequest { form?: string; franchise?: string; council_rank?: string; pass_rule?: string; window_minutes?: unknown; rationale_md?: string; acknowledge_self_removal?: boolean }
378
381
  export interface PostGovernmentBoardCharterResponse { ok: boolean; amendment: unknown; item: unknown; reads_as: unknown }
@@ -553,6 +556,8 @@ export interface PostStoreModulesKeyVersionsVersionErrorCountRequest { day: stri
553
556
  export interface PostStoreModulesKeyVersionsVersionInstallReportRequest { ok: boolean; error_code?: string }
554
557
  export interface PostStoreModulesKeyVersionsVersionReassessRequest { reason?: string }
555
558
  export interface PostStoreModulesKeyVersionsVersionReassessResponse { ok: boolean; queued: boolean; module_key: unknown; version: unknown; version_id: unknown }
559
+ export interface PostStoreModulesKeyVersionsVersionReleaseRequest { reason?: string }
560
+ export interface PostStoreModulesKeyVersionsVersionReleaseResponse { ok: boolean; module_key: unknown; version: unknown; channel: unknown; reason: unknown }
556
561
  export interface PostStoreUsageReportingRequest { enabled: boolean }
557
562
  export interface PostStoreUsageReportingResponse { ok: boolean; enabled: unknown }
558
563
  export interface PostTaskRecommendationsRequest { task_id: number; recommended_to: number; reason: string }
@@ -1044,8 +1049,12 @@ export interface BongosClient {
1044
1049
  putGovernmentAsksMatterId(args?: RequestArgs): Promise<PutGovernmentAsksMatterIdResponse>;
1045
1050
  /** POST /government/asks/{matterId}/pass — rank: any-builder */
1046
1051
  postGovernmentAsksMatterIdPass(args: RequestArgs & { body: PostGovernmentAsksMatterIdPassRequest }): Promise<PostGovernmentAsksMatterIdPassResponse>;
1052
+ /** POST /government/asks/{matterId}/unclear — rank: any-builder */
1053
+ postGovernmentAsksMatterIdUnclear(args?: RequestArgs & { body?: PostGovernmentAsksMatterIdUnclearRequest }): Promise<PostGovernmentAsksMatterIdUnclearResponse>;
1047
1054
  /** POST /government/asks/check — rank: any-builder */
1048
1055
  postGovernmentAsksCheck(args?: RequestArgs): Promise<PostGovernmentAsksCheckResponse>;
1056
+ /** GET /government/asks/unclear — rank: any-builder */
1057
+ getGovernmentAsksUnclear(args?: RequestArgs): Promise<GetGovernmentAsksUnclearResponse>;
1049
1058
  /** GET /government/assignments — rank: archon */
1050
1059
  getGovernmentAssignments(args?: RequestArgs): Promise<GetGovernmentAssignmentsResponse>;
1051
1060
  /** POST /government/assignments — rank: archon */
@@ -1778,6 +1787,8 @@ export interface BongosClient {
1778
1787
  getStoreModulesKeyEntitlement(args?: RequestArgs): Promise<ApiResponse>;
1779
1788
  /** POST /store/modules/{key}/versions — rank: metic+archon */
1780
1789
  postStoreModulesKeyVersions(args?: RequestArgs): Promise<PostStoreModulesKeyVersionsResponse>;
1790
+ /** GET /store/modules/{key}/versions/{version}/channel — rank: any-builder */
1791
+ getStoreModulesKeyVersionsVersionChannel(args?: RequestArgs): Promise<ApiResponse>;
1781
1792
  /** POST /store/modules/{key}/versions/{version}/error-count — rank: any-builder */
1782
1793
  postStoreModulesKeyVersionsVersionErrorCount(args: RequestArgs & { body: PostStoreModulesKeyVersionsVersionErrorCountRequest }): Promise<ApiResponse>;
1783
1794
  /** GET /store/modules/{key}/versions/{version}/howto — rank: any-builder */
@@ -1786,6 +1797,8 @@ export interface BongosClient {
1786
1797
  postStoreModulesKeyVersionsVersionInstallReport(args: RequestArgs & { body: PostStoreModulesKeyVersionsVersionInstallReportRequest }): Promise<ApiResponse>;
1787
1798
  /** POST /store/modules/{key}/versions/{version}/reassess — rank: metic+archon */
1788
1799
  postStoreModulesKeyVersionsVersionReassess(args?: RequestArgs & { body?: PostStoreModulesKeyVersionsVersionReassessRequest }): Promise<PostStoreModulesKeyVersionsVersionReassessResponse>;
1800
+ /** POST /store/modules/{key}/versions/{version}/release — rank: metic+archon */
1801
+ postStoreModulesKeyVersionsVersionRelease(args?: RequestArgs & { body?: PostStoreModulesKeyVersionsVersionReleaseRequest }): Promise<PostStoreModulesKeyVersionsVersionReleaseResponse>;
1789
1802
  /** GET /store/modules/{key}/versions/{version}/tarball — rank: any-builder */
1790
1803
  getStoreModulesKeyVersionsVersionTarball(args?: RequestArgs): Promise<ApiResponse>;
1791
1804
  /** GET /store/modules/latest — rank: any-builder */
@@ -501,8 +501,12 @@ export function createClient(opts = {}) {
501
501
  putGovernmentAsksMatterId: (args) => request("PUT", "/government/asks/{matterId}", { hasBody: true }, args),
502
502
  // POST /government/asks/{matterId}/pass — rank: any-builder — POST /government/asks/:matterId/pass
503
503
  postGovernmentAsksMatterIdPass: (args) => request("POST", "/government/asks/{matterId}/pass", { hasBody: true }, args),
504
+ // POST /government/asks/{matterId}/unclear — rank: any-builder — POST /government/asks/:matterId/unclear
505
+ postGovernmentAsksMatterIdUnclear: (args) => request("POST", "/government/asks/{matterId}/unclear", { hasBody: true }, args),
504
506
  // POST /government/asks/check — rank: any-builder — POST /government/asks/check
505
507
  postGovernmentAsksCheck: (args) => request("POST", "/government/asks/check", { hasBody: true }, args),
508
+ // GET /government/asks/unclear — rank: any-builder — GET /government/asks/unclear
509
+ getGovernmentAsksUnclear: (args) => request("GET", "/government/asks/unclear", { hasBody: false }, args),
506
510
  // GET /government/assignments — rank: archon — GET /government/assignments
507
511
  getGovernmentAssignments: (args) => request("GET", "/government/assignments", { hasBody: false }, args),
508
512
  // POST /government/assignments — rank: archon — POST /government/assignments
@@ -1235,6 +1239,8 @@ export function createClient(opts = {}) {
1235
1239
  getStoreModulesKeyEntitlement: (args) => request("GET", "/store/modules/{key}/entitlement", { hasBody: false }, args),
1236
1240
  // POST /store/modules/{key}/versions — rank: metic+archon — POST /store/modules/:key/versions
1237
1241
  postStoreModulesKeyVersions: (args) => request("POST", "/store/modules/{key}/versions", { hasBody: true }, args),
1242
+ // GET /store/modules/{key}/versions/{version}/channel — rank: any-builder — GET /store/modules/:key/versions/:version/channel
1243
+ getStoreModulesKeyVersionsVersionChannel: (args) => request("GET", "/store/modules/{key}/versions/{version}/channel", { hasBody: false }, args),
1238
1244
  // POST /store/modules/{key}/versions/{version}/error-count — rank: any-builder — POST /store/modules/:key/versions/:version/error-count
1239
1245
  postStoreModulesKeyVersionsVersionErrorCount: (args) => request("POST", "/store/modules/{key}/versions/{version}/error-count", { hasBody: true }, args),
1240
1246
  // GET /store/modules/{key}/versions/{version}/howto — rank: any-builder — GET /store/modules/:key/versions/:version/howto
@@ -1243,6 +1249,8 @@ export function createClient(opts = {}) {
1243
1249
  postStoreModulesKeyVersionsVersionInstallReport: (args) => request("POST", "/store/modules/{key}/versions/{version}/install-report", { hasBody: true }, args),
1244
1250
  // POST /store/modules/{key}/versions/{version}/reassess — rank: metic+archon — POST /store/modules/:key/versions/:version/reassess
1245
1251
  postStoreModulesKeyVersionsVersionReassess: (args) => request("POST", "/store/modules/{key}/versions/{version}/reassess", { hasBody: true }, args),
1252
+ // POST /store/modules/{key}/versions/{version}/release — rank: metic+archon — POST /store/modules/:key/versions/:version/release
1253
+ postStoreModulesKeyVersionsVersionRelease: (args) => request("POST", "/store/modules/{key}/versions/{version}/release", { hasBody: true }, args),
1246
1254
  // GET /store/modules/{key}/versions/{version}/tarball — rank: any-builder — GET /store/modules/:key/versions/:version/tarball
1247
1255
  getStoreModulesKeyVersionsVersionTarball: (args) => request("GET", "/store/modules/{key}/versions/{version}/tarball", { hasBody: false }, args),
1248
1256
  // GET /store/modules/latest — rank: any-builder — GET /store/modules/latest
@@ -8595,6 +8595,47 @@
8595
8595
  ]
8596
8596
  }
8597
8597
  },
8598
+ "/government/asks/unclear": {
8599
+ "get": {
8600
+ "operationId": "get_government_asks_unclear",
8601
+ "tags": [
8602
+ "government"
8603
+ ],
8604
+ "summary": "GET /government/asks/unclear",
8605
+ "description": "board.vote.cast — THE REWORD LIST: the open matters this viewer can see that someone flagged as unclear, oldest flag first, each with its words as they stand (title, detail, stored ask) so a session can rewrite it. → 200 { ok, matters: [{ id, building, source, title, detail, ask, flag }] }\n\n**Rank:** `any-builder` — Any authenticated builder (row-level ownership enforced in-handler).\n\n**Permissions:** `board.vote.cast` (all required).",
8606
+ "x-rank": "any-builder",
8607
+ "x-source": "modules/government/routes/government.js",
8608
+ "x-permissions": [
8609
+ "board.vote.cast"
8610
+ ],
8611
+ "responses": {
8612
+ "200": {
8613
+ "description": "Success.",
8614
+ "content": {
8615
+ "application/json": {
8616
+ "schema": {
8617
+ "$ref": "#/components/schemas/GetGovernmentAsksUnclearResponse"
8618
+ }
8619
+ }
8620
+ }
8621
+ },
8622
+ "400": {
8623
+ "$ref": "#/components/responses/BadRequest"
8624
+ },
8625
+ "401": {
8626
+ "$ref": "#/components/responses/Unauthorized"
8627
+ },
8628
+ "403": {
8629
+ "$ref": "#/components/responses/Forbidden"
8630
+ }
8631
+ },
8632
+ "security": [
8633
+ {
8634
+ "builderSession": []
8635
+ }
8636
+ ]
8637
+ }
8638
+ },
8598
8639
  "/government/asks/{matterId}": {
8599
8640
  "put": {
8600
8641
  "operationId": "put_government_asks_matterId",
@@ -8716,6 +8757,72 @@
8716
8757
  ]
8717
8758
  }
8718
8759
  },
8760
+ "/government/asks/{matterId}/unclear": {
8761
+ "post": {
8762
+ "operationId": "post_government_asks_matterId_unclear",
8763
+ "tags": [
8764
+ "government"
8765
+ ],
8766
+ "summary": "POST /government/asks/:matterId/unclear",
8767
+ "description": "board.vote.cast — \"I DON'T UNDERSTAND THIS\" (the \"?\" on a city card, owner 2026-10-23): puts a matter the flagger can see on the reword list (government_032). An AI session works that list and writes the matter a standard ask (PUT above), which closes the flag. A flag changes nothing a person decides; it only asks for better words. Body: { note? } (≤ 500 chars, what confused them) → 200 { ok, matter_id, flag }\n\n**Rank:** `any-builder` — Any authenticated builder (row-level ownership enforced in-handler).\n\n**Permissions:** `board.vote.cast` (all required).",
8768
+ "x-rank": "any-builder",
8769
+ "x-source": "modules/government/routes/government.js",
8770
+ "x-permissions": [
8771
+ "board.vote.cast"
8772
+ ],
8773
+ "parameters": [
8774
+ {
8775
+ "name": "matterId",
8776
+ "in": "path",
8777
+ "required": true,
8778
+ "schema": {
8779
+ "type": "string"
8780
+ },
8781
+ "description": "Path parameter `matterId`."
8782
+ }
8783
+ ],
8784
+ "requestBody": {
8785
+ "required": false,
8786
+ "content": {
8787
+ "application/json": {
8788
+ "schema": {
8789
+ "$ref": "#/components/schemas/PostGovernmentAsksMatterIdUnclearRequest"
8790
+ }
8791
+ }
8792
+ },
8793
+ "x-validated": true
8794
+ },
8795
+ "responses": {
8796
+ "200": {
8797
+ "description": "Success.",
8798
+ "content": {
8799
+ "application/json": {
8800
+ "schema": {
8801
+ "$ref": "#/components/schemas/PostGovernmentAsksMatterIdUnclearResponse"
8802
+ }
8803
+ }
8804
+ }
8805
+ },
8806
+ "400": {
8807
+ "$ref": "#/components/responses/ValidationFailed"
8808
+ },
8809
+ "401": {
8810
+ "$ref": "#/components/responses/Unauthorized"
8811
+ },
8812
+ "403": {
8813
+ "$ref": "#/components/responses/Forbidden"
8814
+ },
8815
+ "404": {
8816
+ "$ref": "#/components/responses/NotFound"
8817
+ }
8818
+ },
8819
+ "security": [
8820
+ {
8821
+ "builderSession": []
8822
+ }
8823
+ ]
8824
+ }
8825
+ },
8719
8826
  "/government/assignments": {
8720
8827
  "get": {
8721
8828
  "operationId": "get_government_assignments",
@@ -23168,7 +23275,7 @@
23168
23275
  "store"
23169
23276
  ],
23170
23277
  "summary": "GET /store/modules/latest",
23171
- "description": "The newest published version of each named module — what `bongos upgrade` compares an instance's installed store modules against to report the updates available (task 1003787). `?keys=a,b,c`, at most STORE_LATEST_MAX_KEYS. rank: any-builder — a read of public store metadata (version numbers and the core range each needs, the same facts the how-to page shows). It takes no entitlement and changes nothing, unlike acquire; a key the store does not know is simply absent from the answer.\n\n**Rank:** `any-builder` — Any authenticated builder (row-level ownership enforced in-handler).",
23278
+ "description": "The newest published version of each named module — what `bongos upgrade` compares an instance's installed store modules against to report the updates available (task 1003787). `?keys=a,b,c`, at most STORE_LATEST_MAX_KEYS. Only versions on a channel this project takes count (task 1003805), so it reports exactly what `bongos module update` would hand over. rank: any-builder — a read of public store metadata (version numbers and the core range each needs, the same facts the how-to page shows). It takes no entitlement and changes nothing, unlike acquire; a key the store does not know is simply absent from the answer.\n\n**Rank:** `any-builder` — Any authenticated builder (row-level ownership enforced in-handler).",
23172
23279
  "x-rank": "any-builder",
23173
23280
  "x-source": "src/bongos/routes/modules.js",
23174
23281
  "responses": {
@@ -23206,7 +23313,7 @@
23206
23313
  "store"
23207
23314
  ],
23208
23315
  "summary": "POST /store/modules/:key/acquire",
23209
- "description": "---- install: acquire → download → record (task 1003785, ADR 0338 D1) ---- The server end of `bongos module install`. Three steps, so the store never records a version as acquired that the caller did not verify and place: 1. POST acquire — resolve the version, and take the entitlement: a free module (no price, or a zero price) is granted here with source 'free'; a priced one needs the buy action, which is area 8's (tasks 1003788/1003789) and answers 402 until then. 2. GET tarball — served only to a LIVE entitlement holder, never for a delisted module (ADR 0338 D2: no further versions served). 3. POST acquired — the CLI has verified the bytes with verifyModuleArtifact and placed them; recordAcquired stamps the exact version. Own-scoped like the entitlement reads: the holder is always the caller (holder_kind 'builder'), never named in the request, so requireBuilder is the gate — any signed-in builder may take a free module for themselves, and nothing here changes what runs on this instance (install never enables; the CLI places files on the CALLER's checkout). Channels: every version is on the general channel until the channel table (task 1003815) and \"install honours the channel\" (task 1003805) land; those add the channel check to step 1 and step 2, beside the entitlement check.\n\n**Rank:** `any-builder` — Any authenticated builder (row-level ownership enforced in-handler).",
23316
+ "description": "---- install: acquire → download → record (task 1003785, ADR 0338 D1) ---- The server end of `bongos module install`. Three steps, so the store never records a version as acquired that the caller did not verify and place: 1. POST acquire — resolve the version, and take the entitlement: a free module (no price, or a zero price) is granted here with source 'free'; a priced one needs the buy action, which is area 8's (tasks 1003788/1003789) and answers 402 until then. 2. GET tarball — served only to a LIVE entitlement holder, never for a delisted module (ADR 0338 D2: no further versions served). 3. POST acquired — the CLI has verified the bytes with verifyModuleArtifact and placed them; recordAcquired stamps the exact version. Own-scoped like the entitlement reads: the holder is always the caller (holder_kind 'builder'), never named in the request, so requireBuilder is the gate — any signed-in builder may take a free module for themselves, and nothing here changes what runs on this instance (install never enables; the CLI places files on the CALLER's checkout). Channels (task 1003805, ADR 0344): steps 1 and 2 hand out only versions on a channel this project takes (projectChannels) — with no version asked for, the newest there. Install and update share step 1, so both honour it. A project that stops testing keeps the tester version it has; its next update is the newest general one, and update only moves forward, so nothing rolls back. Step 3 records what was already placed, so it does not re-check the channel.\n\n**Rank:** `any-builder` — Any authenticated builder (row-level ownership enforced in-handler).",
23210
23317
  "x-rank": "any-builder",
23211
23318
  "x-source": "src/bongos/routes/modules.js",
23212
23319
  "parameters": [
@@ -23504,6 +23611,60 @@
23504
23611
  ]
23505
23612
  }
23506
23613
  },
23614
+ "/store/modules/{key}/versions/{version}/channel": {
23615
+ "get": {
23616
+ "operationId": "get_store_modules_key_versions_version_channel",
23617
+ "tags": [
23618
+ "store"
23619
+ ],
23620
+ "summary": "GET /store/modules/:key/versions/:version/channel",
23621
+ "description": "GET /api/bongos/store/modules/:key/versions/:version/channel — where a version stands on the promotion gate (task 1003804, ADR 0344 D3): its current channel, who moved it there and why, the rule in plain words, and on tester the numbers the rule reads and what it is waiting for. Any signed-in builder may read it, so an author is never left guessing why a version has not reached everyone.\n\n**Rank:** `any-builder` — Any authenticated builder (row-level ownership enforced in-handler).",
23622
+ "x-rank": "any-builder",
23623
+ "x-source": "src/bongos/routes/modules.js",
23624
+ "parameters": [
23625
+ {
23626
+ "name": "key",
23627
+ "in": "path",
23628
+ "required": true,
23629
+ "schema": {
23630
+ "type": "string"
23631
+ },
23632
+ "description": "Path parameter `key`."
23633
+ },
23634
+ {
23635
+ "name": "version",
23636
+ "in": "path",
23637
+ "required": true,
23638
+ "schema": {
23639
+ "type": "string"
23640
+ },
23641
+ "description": "Path parameter `version`."
23642
+ }
23643
+ ],
23644
+ "responses": {
23645
+ "200": {
23646
+ "description": "Success."
23647
+ },
23648
+ "400": {
23649
+ "$ref": "#/components/responses/BadRequest"
23650
+ },
23651
+ "401": {
23652
+ "$ref": "#/components/responses/Unauthorized"
23653
+ },
23654
+ "403": {
23655
+ "$ref": "#/components/responses/Forbidden"
23656
+ },
23657
+ "404": {
23658
+ "$ref": "#/components/responses/NotFound"
23659
+ }
23660
+ },
23661
+ "security": [
23662
+ {
23663
+ "builderSession": []
23664
+ }
23665
+ ]
23666
+ }
23667
+ },
23507
23668
  "/store/modules/{key}/versions/{version}/error-count": {
23508
23669
  "post": {
23509
23670
  "operationId": "post_store_modules_key_versions_version_error_count",
@@ -23770,6 +23931,81 @@
23770
23931
  ]
23771
23932
  }
23772
23933
  },
23934
+ "/store/modules/{key}/versions/{version}/release": {
23935
+ "post": {
23936
+ "operationId": "post_store_modules_key_versions_version_release",
23937
+ "tags": [
23938
+ "store"
23939
+ ],
23940
+ "summary": "POST /store/modules/:key/versions/:version/release",
23941
+ "description": "POST /api/bongos/store/modules/:key/versions/:version/release — a Metic+ person releases a version the promotion gate HELD on tester (a tester reported a failed install or errors) to general (task 1003804). Gated on module.delist: the owner ruled (2026-10-23) the people who may take a module out of the store are the ones who may let a held version out, with no new permission. Only a held version: one still waiting for its time is the rule's to move. A reason is required; the audit middleware records it with who released it, and set_by on the new channel row.\n\n**Rank:** `metic+archon` — Metic or Archon rank (review/triage powers).\n\n**Permissions:** `module.delist` (all required).",
23942
+ "x-rank": "metic+archon",
23943
+ "x-source": "src/bongos/routes/modules.js",
23944
+ "x-permissions": [
23945
+ "module.delist"
23946
+ ],
23947
+ "parameters": [
23948
+ {
23949
+ "name": "key",
23950
+ "in": "path",
23951
+ "required": true,
23952
+ "schema": {
23953
+ "type": "string"
23954
+ },
23955
+ "description": "Path parameter `key`."
23956
+ },
23957
+ {
23958
+ "name": "version",
23959
+ "in": "path",
23960
+ "required": true,
23961
+ "schema": {
23962
+ "type": "string"
23963
+ },
23964
+ "description": "Path parameter `version`."
23965
+ }
23966
+ ],
23967
+ "requestBody": {
23968
+ "required": false,
23969
+ "content": {
23970
+ "application/json": {
23971
+ "schema": {
23972
+ "$ref": "#/components/schemas/PostStoreModulesKeyVersionsVersionReleaseRequest"
23973
+ }
23974
+ }
23975
+ },
23976
+ "x-validated": true
23977
+ },
23978
+ "responses": {
23979
+ "200": {
23980
+ "description": "Success.",
23981
+ "content": {
23982
+ "application/json": {
23983
+ "schema": {
23984
+ "$ref": "#/components/schemas/PostStoreModulesKeyVersionsVersionReleaseResponse"
23985
+ }
23986
+ }
23987
+ }
23988
+ },
23989
+ "400": {
23990
+ "$ref": "#/components/responses/ValidationFailed"
23991
+ },
23992
+ "401": {
23993
+ "$ref": "#/components/responses/Unauthorized"
23994
+ },
23995
+ "403": {
23996
+ "$ref": "#/components/responses/Forbidden"
23997
+ },
23998
+ "404": {
23999
+ "$ref": "#/components/responses/NotFound"
24000
+ }
24001
+ },
24002
+ "security": [
24003
+ {
24004
+ "builderSession": []
24005
+ }
24006
+ ]
24007
+ }
24008
+ },
23773
24009
  "/store/modules/{key}/versions/{version}/tarball": {
23774
24010
  "get": {
23775
24011
  "operationId": "get_store_modules_key_versions_version_tarball",
@@ -27491,6 +27727,19 @@
27491
27727
  "rollups"
27492
27728
  ]
27493
27729
  },
27730
+ "GetGovernmentAsksUnclearResponse": {
27731
+ "type": "object",
27732
+ "properties": {
27733
+ "ok": {
27734
+ "type": "boolean"
27735
+ },
27736
+ "matters": {}
27737
+ },
27738
+ "required": [
27739
+ "ok",
27740
+ "matters"
27741
+ ]
27742
+ },
27494
27743
  "GetGovernmentAssignmentsResponse": {
27495
27744
  "type": "object",
27496
27745
  "properties": {
@@ -31991,6 +32240,31 @@
31991
32240
  "route"
31992
32241
  ]
31993
32242
  },
32243
+ "PostGovernmentAsksMatterIdUnclearRequest": {
32244
+ "type": "object",
32245
+ "properties": {
32246
+ "note": {
32247
+ "type": "string",
32248
+ "maxLength": 500
32249
+ }
32250
+ },
32251
+ "additionalProperties": false
32252
+ },
32253
+ "PostGovernmentAsksMatterIdUnclearResponse": {
32254
+ "type": "object",
32255
+ "properties": {
32256
+ "ok": {
32257
+ "type": "boolean"
32258
+ },
32259
+ "matter_id": {},
32260
+ "flag": {}
32261
+ },
32262
+ "required": [
32263
+ "ok",
32264
+ "matter_id",
32265
+ "flag"
32266
+ ]
32267
+ },
31994
32268
  "PostGovernmentAssignmentsRequest": {
31995
32269
  "type": "object",
31996
32270
  "properties": {
@@ -35126,6 +35400,35 @@
35126
35400
  "version_id"
35127
35401
  ]
35128
35402
  },
35403
+ "PostStoreModulesKeyVersionsVersionReleaseRequest": {
35404
+ "type": "object",
35405
+ "properties": {
35406
+ "reason": {
35407
+ "type": "string",
35408
+ "maxLength": 2000
35409
+ }
35410
+ },
35411
+ "additionalProperties": false
35412
+ },
35413
+ "PostStoreModulesKeyVersionsVersionReleaseResponse": {
35414
+ "type": "object",
35415
+ "properties": {
35416
+ "ok": {
35417
+ "type": "boolean"
35418
+ },
35419
+ "module_key": {},
35420
+ "version": {},
35421
+ "channel": {},
35422
+ "reason": {}
35423
+ },
35424
+ "required": [
35425
+ "ok",
35426
+ "module_key",
35427
+ "version",
35428
+ "channel",
35429
+ "reason"
35430
+ ]
35431
+ },
35129
35432
  "PostStoreUsageReportingRequest": {
35130
35433
  "type": "object",
35131
35434
  "properties": {
@@ -36201,9 +36504,9 @@
36201
36504
  "description": "A required dependency/feature is not configured or is temporarily down."
36202
36505
  }
36203
36506
  },
36204
- "x-endpoint-count": 568,
36205
- "x-schema-count": 606,
36507
+ "x-endpoint-count": 572,
36508
+ "x-schema-count": 611,
36206
36509
  "x-undocumented-bodies": 12,
36207
- "x-response-schemas": 396,
36510
+ "x-response-schemas": 399,
36208
36511
  "x-generated-by": "scripts/gds/gen-api-docs.js"
36209
36512
  }
@@ -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. 568 endpoints across 96 route files.
5
+ > **Generated from the live route files** — the route file is authoritative. 572 endpoints across 96 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/0016-trust-boundary-server-enforced-permissions.md)): `public` < `any-builder` < `metic+archon` < `archon`.
@@ -343,13 +343,15 @@ Base path: `/api/bongos`. Ranks (enforced server-side, [ADR 0016](adr/0016-trust
343
343
  | GET | `/api/bongos/goals/rollups` | `any-builder` | — | GET /goals/rollups?version= — one small row per goal: readiness counters, the last-activity timestamp, the craft set, and the next claima… |
344
344
  | GET | `/api/bongos/goals/suggestions` | `any-builder` | — | GET /goals/suggestions — "which goal should this draft live in?", answered before anything is created (task 1003062 / R07). |
345
345
 
346
- ## `government` (34)
346
+ ## `government` (36)
347
347
 
348
348
  | Method | Path | Rank | Body | Description |
349
349
  |---|---|---|---|---|
350
350
  | PUT | `/api/bongos/government/asks/:matterId` | `any-builder` | — | board.vote.cast — put an ASK on a docket matter (task 1004703): the one shape every request from an agent to a person takes. |
351
351
  | POST | `/api/bongos/government/asks/:matterId/pass` | `any-builder` | `seat` | board.vote.cast — PASS AN ASK ON to another seat (task 1004705, the direction desk). |
352
+ | POST | `/api/bongos/government/asks/:matterId/unclear` | `any-builder` | `note` | board.vote.cast — "I DON'T UNDERSTAND THIS" (the "?" on a city card, owner 2026-10-23): puts a matter the flagger can see on the reword l… |
352
353
  | POST | `/api/bongos/government/asks/check` | `any-builder` | — | board.vote.cast — CHECK an ask without storing it (task 1004703): the agent's dry run before it files. |
354
+ | GET | `/api/bongos/government/asks/unclear` | `any-builder` | — | board.vote.cast — THE REWORD LIST: the open matters this viewer can see that someone flagged as unclear, oldest flag first, each with its… |
353
355
  | GET | `/api/bongos/government/assignments` | `archon` | — | government.manage — every builder↔rank assignment row. |
354
356
  | POST | `/api/bongos/government/assignments` | `archon` | `builder_id`, `rank_key` | government.manage — assign a CUSTOM rank to a builder. |
355
357
  | DELETE | `/api/bongos/government/assignments/:builderId/:rankKey` | `archon` | — | government.manage — remove a custom-rank assignment. |
@@ -857,7 +859,7 @@ Base path: `/api/bongos`. Ranks (enforced server-side, [ADR 0016](adr/0016-trust
857
859
  | GET | `/api/bongos/sso/pubkey` | `public` | — | GET /sso/pubkey — the hub's Ed25519 assertion-verification key (public). |
858
860
  | POST | `/api/bongos/sso/token` | `public` | `client_id`, `client_secret`, `code`, `redirect_uri` | POST /sso/token — server-to-server code redemption. |
859
861
 
860
- ## `store` (15)
862
+ ## `store` (17)
861
863
 
862
864
  | Method | Path | Rank | Body | Description |
863
865
  |---|---|---|---|---|
@@ -868,10 +870,12 @@ Base path: `/api/bongos`. Ranks (enforced server-side, [ADR 0016](adr/0016-trust
868
870
  | POST | `/api/bongos/store/modules/:key/delist` | `metic+archon` | `reason` | POST /api/bongos/store/modules/:key/delist — a Metic+ person takes a module out of the store (task 1003797, ADR 0338 D2). |
869
871
  | GET | `/api/bongos/store/modules/:key/entitlement` | `any-builder` | — | |
870
872
  | POST | `/api/bongos/store/modules/:key/versions` | `metic+archon` | _undocumented_ | POST /api/bongos/store/modules/:key/versions — publish one module version to the store (task 1004271, ADR 0338 D1). |
873
+ | GET | `/api/bongos/store/modules/:key/versions/:version/channel` | `any-builder` | — | GET /api/bongos/store/modules/:key/versions/:version/channel — where a version stands on the promotion gate (task 1003804, ADR 0344 D3): … |
871
874
  | POST | `/api/bongos/store/modules/:key/versions/:version/error-count` | `any-builder` | `day`, `count` | |
872
875
  | GET | `/api/bongos/store/modules/:key/versions/:version/howto` | `any-builder` | — | GET /api/bongos/store/modules/:key/versions/:version/howto — the how-to a version shipped with (task 1004366, ADR 0347 D1/D3), read from … |
873
876
  | POST | `/api/bongos/store/modules/:key/versions/:version/install-report` | `any-builder` | `ok`, `error_code` | |
874
877
  | POST | `/api/bongos/store/modules/:key/versions/:version/reassess` | `metic+archon` | `reason` | POST /api/bongos/store/modules/:key/versions/:version/reassess — a Metic+ person asks for a published version's assessment to run again: … |
878
+ | POST | `/api/bongos/store/modules/:key/versions/:version/release` | `metic+archon` | `reason` | POST /api/bongos/store/modules/:key/versions/:version/release — a Metic+ person releases a version the promotion gate HELD on tester (a t… |
875
879
  | GET | `/api/bongos/store/modules/:key/versions/:version/tarball` | `any-builder` | — | |
876
880
  | GET | `/api/bongos/store/modules/latest` | `any-builder` | — | The newest published version of each named module — what `bongos upgrade` compares an instance's installed store modules against to repor… |
877
881
  | GET | `/api/bongos/store/usage-reporting` | `any-builder` | — | The caller's own reporting switch (Settings → Profile and privacy). |
@@ -271,6 +271,8 @@ store_module_version_channels(id, version_id FK store_module_versions, channel F
271
271
  reason short code, set_by builder | NULL (system), set_at)
272
272
  -- history; newest row per version is current. Pre-existing versions were
273
273
  -- backfilled to general ('predates_staged_rollout').
274
+ -- idx_store_module_version_channels_current (version_id, set_at DESC, id DESC):
275
+ -- "current channel" is one index probe per version, never a table scan.
274
276
  ```
275
277
 
276
278
  Module entitlements (migration `core_259`, task 1003813 — who holds which module, at which version; the record install, update and the telemetry signals consult; it records ownership, never payment — area 8 owns money):