@bongos/core 1.24.13 → 1.24.15

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 (163) hide show
  1. package/.bongos-core.json +302 -137
  2. package/.claude/skills/blocker-review/SKILL.md +2 -0
  3. package/.claude/skills/session-board/SKILL.md +29 -0
  4. package/.claude/skills/strand-fix/SKILL.md +1 -1
  5. package/clients/bongos-client/README.md +1 -1
  6. package/clients/bongos-client/bongos-client.global.js +14 -0
  7. package/clients/bongos-client/index.cjs +14 -0
  8. package/clients/bongos-client/index.d.ts +23 -2
  9. package/clients/bongos-client/index.mjs +14 -0
  10. package/docs/adr/0385-money-lives-with-a-processor-credits-stay-a-project-meter.md +4 -0
  11. package/docs/adr/0397-the-payment-rail-is-stripe-connect-with-one-connected-account-per-project.md +71 -0
  12. package/docs/adr/README.md +1 -0
  13. package/docs/api/openapi.json +369 -6
  14. package/docs/api-reference.md +19 -4
  15. package/docs/architecture.md +6 -0
  16. package/docs/copy-inventory.md +138 -123
  17. package/docs/copy-registry.json +296 -171
  18. package/docs/file-map.md +1 -0
  19. package/docs/module-api-changelog.md +2 -0
  20. package/docs/page-inventory.json +6 -1
  21. package/docs/page-readings.json +1040 -1021
  22. package/migrations/core_289_task_short_name.sql +34 -0
  23. package/modules/ai-studio/db.js +10 -0
  24. package/modules/ai-studio/gemini.js +73 -5
  25. package/modules/ai-studio/openrouter.js +17 -2
  26. package/modules/ai-studio/routes/ai-studio.js +7 -1
  27. package/modules/ai-studio/studio.js +8 -0
  28. package/modules/builder-settings/checkout-freshness.js +71 -0
  29. package/modules/builder-settings/routes/settings.js +26 -0
  30. package/modules/builder-settings/settings.js +2 -0
  31. package/modules/economy/migrations/economy_002_project_account.sql +83 -0
  32. package/modules/economy/module.json +1 -1
  33. package/modules/economy/project-account.js +166 -0
  34. package/modules/economy/routes/project-account.js +40 -0
  35. package/modules/hall-ui/public/ai-studio.css +3 -0
  36. package/modules/hall-ui/public/ai-studio.html +2 -1
  37. package/modules/hall-ui/public/ai-studio.js +72 -1
  38. package/modules/hall-ui/public/atlas.html +1 -1
  39. package/modules/hall-ui/public/blockers.html +1 -1
  40. package/modules/hall-ui/public/board-room.html +1 -1
  41. package/modules/hall-ui/public/city.html +1 -1
  42. package/modules/hall-ui/public/collab.html +1 -1
  43. package/modules/hall-ui/public/commands.html +1 -1
  44. package/modules/hall-ui/public/copy-desk.html +1 -1
  45. package/modules/hall-ui/public/deploy.html +1 -1
  46. package/modules/hall-ui/public/diagrams.html +1 -1
  47. package/modules/hall-ui/public/drachmae.html +1 -1
  48. package/modules/hall-ui/public/fleet.html +1 -1
  49. package/modules/hall-ui/public/gate.html +1 -1
  50. package/modules/hall-ui/public/github-chip.js +85 -0
  51. package/modules/hall-ui/public/goal-map.html +1 -1
  52. package/modules/hall-ui/public/goals.html +1 -1
  53. package/modules/hall-ui/public/government.html +1 -1
  54. package/modules/hall-ui/public/idea.html +1 -1
  55. package/modules/hall-ui/public/ideas.html +1 -1
  56. package/modules/hall-ui/public/index.html +1 -1
  57. package/modules/hall-ui/public/market-watch-item.html +2 -2
  58. package/modules/hall-ui/public/market-watch-item.js +10 -3
  59. package/modules/hall-ui/public/market-watch-item.states.json +41 -0
  60. package/modules/hall-ui/public/market-watch-lib.js +36 -5
  61. package/modules/hall-ui/public/market-watch-rules.html +1 -1
  62. package/modules/hall-ui/public/market-watch-settings.html +1 -1
  63. package/modules/hall-ui/public/market-watch.css +5 -0
  64. package/modules/hall-ui/public/market-watch.html +2 -2
  65. package/modules/hall-ui/public/modules.html +1 -1
  66. package/modules/hall-ui/public/my-agents.html +1 -1
  67. package/modules/hall-ui/public/my-agents.js +3 -0
  68. package/modules/hall-ui/public/primer.html +1 -1
  69. package/modules/hall-ui/public/profile.html +1 -1
  70. package/modules/hall-ui/public/project-settings.html +1 -1
  71. package/modules/hall-ui/public/ranks.html +1 -1
  72. package/modules/hall-ui/public/roadmap.html +1 -1
  73. package/modules/hall-ui/public/roster.html +1 -1
  74. package/modules/hall-ui/public/sessions.html +1 -1
  75. package/modules/hall-ui/public/settings.html +1 -1
  76. package/modules/hall-ui/public/shell.js +22 -22
  77. package/modules/hall-ui/public/street.html +1 -1
  78. package/modules/hall-ui/public/studio.html +1 -1
  79. package/modules/hall-ui/public/style.css +28 -0
  80. package/modules/hall-ui/public/task.html +1 -1
  81. package/modules/hall-ui/public/thinking.html +1 -1
  82. package/modules/hall-ui/public/tweak-editor.html +1 -1
  83. package/modules/hall-ui/public/watch.html +1 -1
  84. package/modules/hall-ui/public/work.html +1 -1
  85. package/modules/ideas/blockers.js +13 -7
  86. package/modules/lifecycle/db-claim-reads.js +1 -1
  87. package/modules/lifecycle/db-ship.js +2 -2
  88. package/modules/lifecycle/db-tasks.js +4 -4
  89. package/modules/lifecycle/migrations/lifecycle_019_pay_type_gates.sql +50 -0
  90. package/modules/lifecycle/module.json +1 -0
  91. package/modules/lifecycle/pay-type-gates.js +180 -0
  92. package/modules/lifecycle/publish-reconciler.js +31 -1
  93. package/modules/lifecycle/rebase-gate.js +3 -2
  94. package/modules/lifecycle/routes/claims.js +3 -2
  95. package/modules/lifecycle/routes/pay-type-gates.js +59 -0
  96. package/modules/lifecycle/routes/project-settings.js +4 -0
  97. package/modules/lifecycle/routes/task-write-routes.js +43 -0
  98. package/modules/lifecycle/ship-card.js +4 -1
  99. package/modules/lifecycle/task-name-db.js +55 -0
  100. package/modules/lifecycle/task-name.js +140 -0
  101. package/modules/market-watch/db.js +10 -1
  102. package/modules/market-watch/migrations/market_watch_004_entry_corrections.sql +20 -0
  103. package/modules/market-watch/pages.js +20 -1
  104. package/modules/market-watch/proposals.js +57 -7
  105. package/modules/market-watch/routes/pages.js +2 -0
  106. package/modules/market-watch/routes/rules.js +4 -0
  107. package/modules/platform-identity/terms-acceptance.js +9 -9
  108. package/modules/public-landing/public/account-google.states.json +14 -0
  109. package/modules/public-landing/public/assets/cosmos.css +12 -0
  110. package/modules/public-landing/public/assets/hub-bar.js +44 -1
  111. package/modules/public-landing/public/privacy.html +5 -1
  112. package/modules/public-landing/public/projects-google.states.json +14 -0
  113. package/modules/public-landing/public/projects.html +39 -0
  114. package/modules/public-landing/public/terms.html +12 -2
  115. package/modules/ui-design/kit/fixtures/me-google.json +10 -0
  116. package/modules/ui-design/kit/fixtures/me-sign-in-methods-google.json +4 -0
  117. package/modules/ui-design/kit/serve.js +7 -1
  118. package/package-lock.json +2 -2
  119. package/package.json +1 -1
  120. package/release-notes.json +54 -0
  121. package/scripts/bongos/claim.js +4 -2
  122. package/scripts/bongos/land-watch.js +1 -0
  123. package/scripts/bongos/report-checkout.js +30 -0
  124. package/scripts/bongos/run-unit-tests.js +11 -0
  125. package/scripts/bongos/sessions-board.js +264 -0
  126. package/scripts/bongos/ship-finish.js +1 -0
  127. package/scripts/bongos/ship-flow.js +5 -2
  128. package/scripts/bongos/strand-lease.js +5 -3
  129. package/scripts/bongos/strand-watch.js +38 -7
  130. package/scripts/gds/report-checkout.js +7 -0
  131. package/scripts/gds/sessions-board.js +7 -0
  132. package/src/bongos/agent-standing-rules.js +13 -3
  133. package/src/bongos/routes/me.js +7 -1
  134. package/src/module-api.js +1 -1
  135. package/tests/agent_standing_rules.mjs +18 -1
  136. package/tests/ai_studio_billing.mjs +13 -0
  137. package/tests/ai_studio_gemini_models.mjs +81 -0
  138. package/tests/ai_studio_requests.mjs +24 -0
  139. package/tests/blocker_detail_hydration.mjs +5 -3
  140. package/tests/blocker_tasks_named_db.mjs +74 -0
  141. package/tests/claim_gate_ci_unblock.mjs +1 -1
  142. package/tests/github_chip.mjs +217 -0
  143. package/tests/hall_ai_studio.mjs +129 -5
  144. package/tests/host_topology_skips.mjs +1 -0
  145. package/tests/hub_account_page.mjs +3 -2
  146. package/tests/landing_legal_pages.mjs +3 -2
  147. package/tests/market_watch_data_db.mjs +6 -0
  148. package/tests/market_watch_pages.mjs +87 -2
  149. package/tests/market_watch_rules.mjs +101 -5
  150. package/tests/market_watch_rules_db.mjs +42 -0
  151. package/tests/nav_permission_atoms.mjs +1 -1
  152. package/tests/pay_terms.mjs +8 -0
  153. package/tests/pay_type_gates.mjs +234 -0
  154. package/tests/pay_type_gates_db.mjs +84 -0
  155. package/tests/project_account.mjs +125 -0
  156. package/tests/project_account_db.mjs +97 -0
  157. package/tests/self_healing_start.mjs +162 -0
  158. package/tests/sessions_board.mjs +153 -0
  159. package/tests/stop_refcheck.mjs +40 -0
  160. package/tests/task_name.mjs +237 -0
  161. package/tests/task_name_db.mjs +79 -0
  162. package/tests/terms_acceptance.mjs +25 -3
  163. package/tests/terms_grandfather_db.mjs +11 -4
@@ -47,6 +47,8 @@ node scripts/bongos/api.js GET /api/bongos/blockers
47
47
 
48
48
  If the list is empty, print "no open blockers — nothing to review today" and exit.
49
49
 
50
+ Each blocker's `blocking_tasks` lists the tasks it holds with their `short_name`; name them to the person as "task N - <name>", never a bare number.
51
+
50
52
  **"What's stuck on me" reads the per-person list instead (task 1004999).** A blocker has no assignee; who it waits on is the seat its ask names (owner, a building's Lead, a board), resolved to people by the same routing the City uses. When the builder asks what is stuck on THEM, fetch only theirs, and name each one's seat ("as the owner", "as the Planning Lead"):
51
53
 
52
54
  ```
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: session-board
3
+ description: >-
4
+ Show every session the builder has going and where they are jammed, as a board in chat. Triggers: "/session-board", "what are my sessions doing", "where are things stuck", "why is everything waiting", "show my sessions".
5
+ plain: >-
6
+ Shows, in the chat, every piece of work you have going at once: what each one is doing, what is waiting to land, and what is stuck and holding the rest up.
7
+ reach-for: >-
8
+ When you run several sessions and things seem to be waiting on each other, or you want to know which one to look at first.
9
+ cost: >-
10
+ Free. It only reads; nothing changes.
11
+ ---
12
+
13
+ You are showing the builder a board of everything they have in flight (task 1004957). It reads only.
14
+
15
+ ## Run it
16
+
17
+ ```bash
18
+ node scripts/bongos/sessions-board.js
19
+ ```
20
+
21
+ It prints markdown: a **Jams** list first, then one table — each session's folder, its task, its stage (building, waiting to land, back from review, stuck) and what it is waiting on. Paste it into your reply as it is; it is already written for the builder.
22
+
23
+ ## Then say what to do about the jams, in one or two lines
24
+
25
+ - **"New work is paused for every one of your sessions"** is the one that matters most: too many finished pieces are stuck, so no session can start new work until one comes down. Say which stuck ship nobody is fixing yet and offer `/strand-fix N` for it. Never send more than one session at the same stuck ship — a ship marked "<session> is fixing it" is that session's.
26
+ - **A single stuck ship** that is not pausing anything can wait; mention it, do not lead with it.
27
+ - **Nothing jammed**: say so in one line and stop.
28
+
29
+ `--json` prints the same as data if you need to reason over it. The startup line (`--line`) is silent unless new work is paused; this skill is how the builder sees the whole picture.
@@ -33,7 +33,7 @@ node scripts/bongos/strand-lease.js take N # exit 0: it is yours · exit 3: an
33
33
 
34
34
  ## Which shape is this? (read first)
35
35
 
36
- `node scripts/bongos/strand-watch.js --json` — find the task. Three shapes, three owners:
36
+ `node scripts/bongos/strand-watch.js --json` — find the task. Each strand carries its `name`; to the builder, write it as "task N - <name>", never the bare number. Three shapes, three owners:
37
37
 
38
38
  | shape | status | reason | this skill? |
39
39
  |---|---|---|---|
@@ -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
- - 652 operations across 81 resource groups
8
+ - 657 operations across 83 resource groups
9
9
 
10
10
  ## Use it from your project
11
11
 
@@ -793,6 +793,8 @@ function createClient(opts = {}) {
793
793
  getMeAchievements: (args) => request("GET", "/me/achievements", { hasBody: false }, args),
794
794
  // POST /me/anthropic-link — rank: any-builder — POST /me/anthropic-link
795
795
  postMeAnthropicLink: (args) => request("POST", "/me/anthropic-link", { hasBody: true }, args),
796
+ // PATCH /me/checkout-freshness — rank: any-builder — PATCH /me/checkout-freshness
797
+ patchMeCheckoutFreshness: (args) => request("PATCH", "/me/checkout-freshness", { hasBody: true }, args),
796
798
  // PATCH /me/core-move-seen — rank: any-builder — PATCH /me/core-move-seen
797
799
  patchMeCoreMoveSeen: (args) => request("PATCH", "/me/core-move-seen", { hasBody: true }, args),
798
800
  // GET /me/credits — rank: any-builder — GET /me/credits
@@ -1022,6 +1024,12 @@ function createClient(opts = {}) {
1022
1024
  // GET /pay-terms — rank: any-builder — GET /pay-terms
1023
1025
  getPayTerms: (args) => request("GET", "/pay-terms", { hasBody: false }, args),
1024
1026
  },
1027
+ "payTypeGates": {
1028
+ // GET /pay-type-gates — rank: any-builder — GET /pay-type-gates
1029
+ getPayTypeGates: (args) => request("GET", "/pay-type-gates", { hasBody: false }, args),
1030
+ // PUT /pay-type-gates/{payType}/{requirement} — rank: archon — PUT /pay-type-gates/:payType/:requirement
1031
+ putPayTypeGatesPayTypeRequirement: (args) => request("PUT", "/pay-type-gates/{payType}/{requirement}", { hasBody: true }, args),
1032
+ },
1025
1033
  "payouts": {
1026
1034
  // POST /payouts/age-records — rank: archon — POST /payouts/age-records
1027
1035
  postPayoutsAgeRecords: (args) => request("POST", "/payouts/age-records", { hasBody: true }, args),
@@ -1064,6 +1072,10 @@ function createClient(opts = {}) {
1064
1072
  // GET /project/manage-link — rank: archon — GET /project/manage-link
1065
1073
  getProjectManageLink: (args) => request("GET", "/project/manage-link", { hasBody: false }, args),
1066
1074
  },
1075
+ "projectAccount": {
1076
+ // GET /project-account — rank: archon — GET /project-account
1077
+ getProjectAccount: (args) => request("GET", "/project-account", { hasBody: false }, args),
1078
+ },
1067
1079
  "projectSettings": {
1068
1080
  // GET /project-settings — rank: metic+archon — GET /project-settings
1069
1081
  getProjectSettings: (args) => request("GET", "/project-settings", { hasBody: false }, args),
@@ -1493,6 +1505,8 @@ function createClient(opts = {}) {
1493
1505
  getTasksIdRecommendations: (args) => request("GET", "/tasks/{id}/recommendations", { hasBody: false }, args),
1494
1506
  // POST /tasks/{id}/ship — rank: any-builder — POST /tasks/:id/ship
1495
1507
  postTasksIdShip: (args) => request("POST", "/tasks/{id}/ship", { hasBody: true }, args),
1508
+ // PATCH /tasks/{id}/short-name — rank: any-builder — PATCH /tasks/:id/short-name
1509
+ patchTasksIdShortName: (args) => request("PATCH", "/tasks/{id}/short-name", { hasBody: true }, args),
1496
1510
  // DELETE /tasks/{id}/visual — rank: any-builder — DELETE /tasks/:id/visual
1497
1511
  deleteTasksIdVisual: (args) => request("DELETE", "/tasks/{id}/visual", { hasBody: false }, args),
1498
1512
  // POST /tasks/{id}/visual — rank: any-builder — POST /tasks/:id/visual
@@ -792,6 +792,8 @@ function createClient(opts = {}) {
792
792
  getMeAchievements: (args) => request("GET", "/me/achievements", { hasBody: false }, args),
793
793
  // POST /me/anthropic-link — rank: any-builder — POST /me/anthropic-link
794
794
  postMeAnthropicLink: (args) => request("POST", "/me/anthropic-link", { hasBody: true }, args),
795
+ // PATCH /me/checkout-freshness — rank: any-builder — PATCH /me/checkout-freshness
796
+ patchMeCheckoutFreshness: (args) => request("PATCH", "/me/checkout-freshness", { hasBody: true }, args),
795
797
  // PATCH /me/core-move-seen — rank: any-builder — PATCH /me/core-move-seen
796
798
  patchMeCoreMoveSeen: (args) => request("PATCH", "/me/core-move-seen", { hasBody: true }, args),
797
799
  // GET /me/credits — rank: any-builder — GET /me/credits
@@ -1021,6 +1023,12 @@ function createClient(opts = {}) {
1021
1023
  // GET /pay-terms — rank: any-builder — GET /pay-terms
1022
1024
  getPayTerms: (args) => request("GET", "/pay-terms", { hasBody: false }, args),
1023
1025
  },
1026
+ "payTypeGates": {
1027
+ // GET /pay-type-gates — rank: any-builder — GET /pay-type-gates
1028
+ getPayTypeGates: (args) => request("GET", "/pay-type-gates", { hasBody: false }, args),
1029
+ // PUT /pay-type-gates/{payType}/{requirement} — rank: archon — PUT /pay-type-gates/:payType/:requirement
1030
+ putPayTypeGatesPayTypeRequirement: (args) => request("PUT", "/pay-type-gates/{payType}/{requirement}", { hasBody: true }, args),
1031
+ },
1024
1032
  "payouts": {
1025
1033
  // POST /payouts/age-records — rank: archon — POST /payouts/age-records
1026
1034
  postPayoutsAgeRecords: (args) => request("POST", "/payouts/age-records", { hasBody: true }, args),
@@ -1063,6 +1071,10 @@ function createClient(opts = {}) {
1063
1071
  // GET /project/manage-link — rank: archon — GET /project/manage-link
1064
1072
  getProjectManageLink: (args) => request("GET", "/project/manage-link", { hasBody: false }, args),
1065
1073
  },
1074
+ "projectAccount": {
1075
+ // GET /project-account — rank: archon — GET /project-account
1076
+ getProjectAccount: (args) => request("GET", "/project-account", { hasBody: false }, args),
1077
+ },
1066
1078
  "projectSettings": {
1067
1079
  // GET /project-settings — rank: metic+archon — GET /project-settings
1068
1080
  getProjectSettings: (args) => request("GET", "/project-settings", { hasBody: false }, args),
@@ -1492,6 +1504,8 @@ function createClient(opts = {}) {
1492
1504
  getTasksIdRecommendations: (args) => request("GET", "/tasks/{id}/recommendations", { hasBody: false }, args),
1493
1505
  // POST /tasks/{id}/ship — rank: any-builder — POST /tasks/:id/ship
1494
1506
  postTasksIdShip: (args) => request("POST", "/tasks/{id}/ship", { hasBody: true }, args),
1507
+ // PATCH /tasks/{id}/short-name — rank: any-builder — PATCH /tasks/:id/short-name
1508
+ patchTasksIdShortName: (args) => request("PATCH", "/tasks/{id}/short-name", { hasBody: true }, args),
1495
1509
  // DELETE /tasks/{id}/visual — rank: any-builder — DELETE /tasks/:id/visual
1496
1510
  deleteTasksIdVisual: (args) => request("DELETE", "/tasks/{id}/visual", { hasBody: false }, args),
1497
1511
  // POST /tasks/{id}/visual — rank: any-builder — POST /tasks/:id/visual
@@ -40,7 +40,7 @@ export interface GetAiStudioBalanceResponse { payments: unknown; test_mode: bool
40
40
  export interface GetAiStudioKeysResponse { storage_configured: unknown; keys: unknown }
41
41
  export interface GetAiStudioRequestsIdResponse { request: unknown }
42
42
  export interface GetAiStudioRequestsResponse { requests: unknown }
43
- export interface GetAiStudioStatusResponse { ok: boolean; module: unknown }
43
+ export interface GetAiStudioStatusResponse { ok: boolean; module: unknown; terms: unknown; adult: unknown }
44
44
  export interface GetAiStudioTopupQuoteResponse { quote: unknown; min_micro: unknown; max_micro: unknown }
45
45
  export interface GetArtistGateResponse { ok: boolean; mode: unknown; since: unknown; holds: boolean; truncated: unknown; reviews: unknown; halt: unknown }
46
46
  export interface GetAuditLogResponse { rows: unknown; page: unknown }
@@ -142,6 +142,7 @@ export interface GetPageNotesIdeasResponse { page_path: unknown; ideas: unknown
142
142
  export interface GetPageNotesResponse { page_id: unknown; notes: unknown }
143
143
  export interface GetPageNotesSiteResponse { notes: unknown }
144
144
  export interface GetPayTermsResponse { pay_terms: unknown }
145
+ export interface GetPayTypeGatesResponse { gates: unknown }
145
146
  export interface GetPayoutsApprovalsResponse { approvals: unknown }
146
147
  export interface GetPayoutsGatesBuilderIdResponse { gate: unknown }
147
148
  export interface GetPayoutsRulesResponse { rules: unknown }
@@ -245,6 +246,8 @@ export interface PatchInboxIdBodyResponse { ok: boolean; idea: unknown; delta: u
245
246
  export interface PatchInboxIdRequest { status?: "open" | "promoted" | "discarded" | "merged"; kind?: string; promoted_to_task_id?: number; reviewed_at?: unknown; merged_into_idea_id?: number; triage_note?: string }
246
247
  export interface PatchInboxIdResponse { idea: unknown }
247
248
  export interface PatchMarketWatchSettingsRequest { enabled?: unknown; monthly_cap_usd?: unknown; cadence?: unknown }
249
+ export interface PatchMeCheckoutFreshnessRequest { behind: number; branch?: string; reason: string }
250
+ export interface PatchMeCheckoutFreshnessResponse { ok: boolean; checkout: unknown }
248
251
  export interface PatchMeCoreMoveSeenRequest { id: string }
249
252
  export interface PatchMeCoreMoveSeenResponse { ok: boolean; seen: unknown }
250
253
  export interface PatchMeCrossProjectRequest { hide_stats?: boolean; account_visibility?: string; recruiter_discoverable?: boolean }
@@ -289,6 +292,8 @@ export interface PatchSpecialitiesIdResponse { speciality: unknown }
289
292
  export interface PatchTaskRecommendationsIdRequest { status: "declined" | "withdrawn" }
290
293
  export interface PatchTaskRecommendationsIdResponse { ok: boolean; recommendation: unknown }
291
294
  export interface PatchTasksIdRequest { kind?: string; discipline?: string; requires_rank?: string; module_key?: string; goal_id?: number; parent_task_id?: StringifiableId; parallel_safe?: unknown; newcomer_friendly?: boolean; xenos_claimable?: boolean; security_sensitive?: boolean; automation_tag?: string; needs?: unknown; needs_migration?: boolean; description?: string; title?: string; priority?: unknown; value_summary?: string; status?: unknown; pay_terms?: unknown }
295
+ export interface PatchTasksIdShortNameRequest { short_name: string }
296
+ export interface PatchTasksIdShortNameResponse { task: unknown }
292
297
  export interface PostAccessRequestsInviteRequest { github_login: string; note?: string }
293
298
  export interface PostAccessRequestsInviteResponse { ok: boolean; already_invited?: boolean; github_login?: unknown; request?: unknown }
294
299
  export interface PostAccessRequestsRequest { github_login: string; display_name?: string; note?: string }
@@ -470,7 +475,7 @@ export interface PostLlmCacheStoreResponse { stored: boolean; result_cost_usd?:
470
475
  export interface PostMarketWatchAskAnswerRequest { week_of?: string; picks?: unknown[]; names?: unknown[]; nothing?: boolean; builder_id?: number }
471
476
  export interface PostMarketWatchProposalsIdDecideRequest { decision: "approve" | "decline" }
472
477
  export interface PostMarketWatchProposalsIdVoteResponse { ok: boolean; matter_id: unknown; item_id: unknown }
473
- export interface PostMarketWatchProposalsRequest { kind: string; reason?: string; item_id?: StringifiableId; dimension?: string; value?: unknown; url?: string; log_entry_id?: StringifiableId; scout?: string; name?: string }
478
+ export interface PostMarketWatchProposalsRequest { kind: string; reason?: string; item_id?: StringifiableId; dimension?: string; value?: unknown; url?: string; log_entry_id?: StringifiableId; takeaway?: string; wrong?: unknown; scout?: string; name?: string }
474
479
  export interface PostMarketWatchProposalsResponse { proposal: unknown }
475
480
  export interface PostMarketWatchRulesProposalsRequest { step: string; change: Record<string, unknown>; reason: string }
476
481
  export interface PostMarketWatchRulesProposalsResponse { ok: boolean; proposal: unknown }
@@ -690,6 +695,8 @@ export interface PutMarketWatchSettingsKeyRequest { key: string }
690
695
  export interface PutMingleOptInRequest { opted_in: boolean }
691
696
  export interface PutMingleOptInResponse { opted_in: unknown; updated_at: unknown }
692
697
  export interface PutMingleProjectRequest { enabled: boolean }
698
+ export interface PutPayTypeGatesPayTypeRequirementRequest { state?: unknown; evidence_ref?: unknown; acknowledged?: unknown }
699
+ export interface PutPayTypeGatesPayTypeRequirementResponse { ok: boolean; gate: unknown }
693
700
  export interface PutProvisioningInstancesIdLogoRequest { image_b64: string; content_type: string }
694
701
  export interface PutRenderDeployAppRequest { ownerId?: string; serviceId?: string }
695
702
  export interface PutRenderDeployAppResponse { app: unknown }
@@ -1424,6 +1431,8 @@ export interface BongosClient {
1424
1431
  getMeAchievements(args?: RequestArgs): Promise<GetMeAchievementsResponse>;
1425
1432
  /** POST /me/anthropic-link — rank: any-builder */
1426
1433
  postMeAnthropicLink(args: RequestArgs & { body: PostMeAnthropicLinkRequest }): Promise<PostMeAnthropicLinkResponse>;
1434
+ /** PATCH /me/checkout-freshness — rank: any-builder */
1435
+ patchMeCheckoutFreshness(args: RequestArgs & { body: PatchMeCheckoutFreshnessRequest }): Promise<PatchMeCheckoutFreshnessResponse>;
1427
1436
  /** PATCH /me/core-move-seen — rank: any-builder */
1428
1437
  patchMeCoreMoveSeen(args: RequestArgs & { body: PatchMeCoreMoveSeenRequest }): Promise<PatchMeCoreMoveSeenResponse>;
1429
1438
  /** GET /me/credits — rank: any-builder */
@@ -1653,6 +1662,12 @@ export interface BongosClient {
1653
1662
  /** GET /pay-terms — rank: any-builder */
1654
1663
  getPayTerms(args?: RequestArgs): Promise<GetPayTermsResponse>;
1655
1664
  };
1665
+ "payTypeGates": {
1666
+ /** GET /pay-type-gates — rank: any-builder */
1667
+ getPayTypeGates(args?: RequestArgs): Promise<GetPayTypeGatesResponse>;
1668
+ /** PUT /pay-type-gates/{payType}/{requirement} — rank: archon */
1669
+ putPayTypeGatesPayTypeRequirement(args?: RequestArgs & { body?: PutPayTypeGatesPayTypeRequirementRequest }): Promise<PutPayTypeGatesPayTypeRequirementResponse>;
1670
+ };
1656
1671
  "payouts": {
1657
1672
  /** POST /payouts/age-records — rank: archon */
1658
1673
  postPayoutsAgeRecords(args: RequestArgs & { body: PostPayoutsAgeRecordsRequest }): Promise<PostPayoutsAgeRecordsResponse>;
@@ -1695,6 +1710,10 @@ export interface BongosClient {
1695
1710
  /** GET /project/manage-link — rank: archon */
1696
1711
  getProjectManageLink(args?: RequestArgs): Promise<GetProjectManageLinkResponse>;
1697
1712
  };
1713
+ "projectAccount": {
1714
+ /** GET /project-account — rank: archon */
1715
+ getProjectAccount(args?: RequestArgs): Promise<ApiResponse>;
1716
+ };
1698
1717
  "projectSettings": {
1699
1718
  /** GET /project-settings — rank: metic+archon */
1700
1719
  getProjectSettings(args?: RequestArgs): Promise<GetProjectSettingsResponse>;
@@ -2124,6 +2143,8 @@ export interface BongosClient {
2124
2143
  getTasksIdRecommendations(args?: RequestArgs): Promise<GetTasksIdRecommendationsResponse>;
2125
2144
  /** POST /tasks/{id}/ship — rank: any-builder */
2126
2145
  postTasksIdShip(args?: RequestArgs): Promise<PostTasksIdShipResponse>;
2146
+ /** PATCH /tasks/{id}/short-name — rank: any-builder */
2147
+ patchTasksIdShortName(args: RequestArgs & { body: PatchTasksIdShortNameRequest }): Promise<PatchTasksIdShortNameResponse>;
2127
2148
  /** DELETE /tasks/{id}/visual — rank: any-builder */
2128
2149
  deleteTasksIdVisual(args?: RequestArgs): Promise<DeleteTasksIdVisualResponse>;
2129
2150
  /** POST /tasks/{id}/visual — rank: any-builder */
@@ -789,6 +789,8 @@ export function createClient(opts = {}) {
789
789
  getMeAchievements: (args) => request("GET", "/me/achievements", { hasBody: false }, args),
790
790
  // POST /me/anthropic-link — rank: any-builder — POST /me/anthropic-link
791
791
  postMeAnthropicLink: (args) => request("POST", "/me/anthropic-link", { hasBody: true }, args),
792
+ // PATCH /me/checkout-freshness — rank: any-builder — PATCH /me/checkout-freshness
793
+ patchMeCheckoutFreshness: (args) => request("PATCH", "/me/checkout-freshness", { hasBody: true }, args),
792
794
  // PATCH /me/core-move-seen — rank: any-builder — PATCH /me/core-move-seen
793
795
  patchMeCoreMoveSeen: (args) => request("PATCH", "/me/core-move-seen", { hasBody: true }, args),
794
796
  // GET /me/credits — rank: any-builder — GET /me/credits
@@ -1018,6 +1020,12 @@ export function createClient(opts = {}) {
1018
1020
  // GET /pay-terms — rank: any-builder — GET /pay-terms
1019
1021
  getPayTerms: (args) => request("GET", "/pay-terms", { hasBody: false }, args),
1020
1022
  },
1023
+ "payTypeGates": {
1024
+ // GET /pay-type-gates — rank: any-builder — GET /pay-type-gates
1025
+ getPayTypeGates: (args) => request("GET", "/pay-type-gates", { hasBody: false }, args),
1026
+ // PUT /pay-type-gates/{payType}/{requirement} — rank: archon — PUT /pay-type-gates/:payType/:requirement
1027
+ putPayTypeGatesPayTypeRequirement: (args) => request("PUT", "/pay-type-gates/{payType}/{requirement}", { hasBody: true }, args),
1028
+ },
1021
1029
  "payouts": {
1022
1030
  // POST /payouts/age-records — rank: archon — POST /payouts/age-records
1023
1031
  postPayoutsAgeRecords: (args) => request("POST", "/payouts/age-records", { hasBody: true }, args),
@@ -1060,6 +1068,10 @@ export function createClient(opts = {}) {
1060
1068
  // GET /project/manage-link — rank: archon — GET /project/manage-link
1061
1069
  getProjectManageLink: (args) => request("GET", "/project/manage-link", { hasBody: false }, args),
1062
1070
  },
1071
+ "projectAccount": {
1072
+ // GET /project-account — rank: archon — GET /project-account
1073
+ getProjectAccount: (args) => request("GET", "/project-account", { hasBody: false }, args),
1074
+ },
1063
1075
  "projectSettings": {
1064
1076
  // GET /project-settings — rank: metic+archon — GET /project-settings
1065
1077
  getProjectSettings: (args) => request("GET", "/project-settings", { hasBody: false }, args),
@@ -1489,6 +1501,8 @@ export function createClient(opts = {}) {
1489
1501
  getTasksIdRecommendations: (args) => request("GET", "/tasks/{id}/recommendations", { hasBody: false }, args),
1490
1502
  // POST /tasks/{id}/ship — rank: any-builder — POST /tasks/:id/ship
1491
1503
  postTasksIdShip: (args) => request("POST", "/tasks/{id}/ship", { hasBody: true }, args),
1504
+ // PATCH /tasks/{id}/short-name — rank: any-builder — PATCH /tasks/:id/short-name
1505
+ patchTasksIdShortName: (args) => request("PATCH", "/tasks/{id}/short-name", { hasBody: true }, args),
1492
1506
  // DELETE /tasks/{id}/visual — rank: any-builder — DELETE /tasks/:id/visual
1493
1507
  deleteTasksIdVisual: (args) => request("DELETE", "/tasks/{id}/visual", { hasBody: false }, args),
1494
1508
  // POST /tasks/{id}/visual — rank: any-builder — POST /tasks/:id/visual
@@ -73,6 +73,10 @@ The owner answered the questions left open by the payments build plan ([task 100
73
73
  - **"Verro" is Verro Labs**, the planned holding company of Cloud Bongos LLC and related entities, as now named in the EU labour row above.
74
74
  - **ADR 0054's "credits are equity" framing is formally superseded**, as recorded in ADR 0054 itself ([task 1004967](https://cloudbongos.com/builders#/task/1004967)).
75
75
 
76
+ ## Amendment, 2026-10-30: the processor is chosen
77
+
78
+ [ADR 0397](0397-the-payment-rail-is-stripe-connect-with-one-connected-account-per-project.md) picks Stripe Connect (fallback J.P. Morgan Payments) and fills in the per-flow map above with a primitive for each flow. The counsel items below are unchanged. [Task 1003182](https://cloudbongos.com/builders#/task/1003182) builds the project account as decided here: an append-only record of each movement and its cause, and a read-only owner view, with no money held (see `modules/economy/project-account.js`).
79
+
76
80
  ## Held for counsel (these block building the money-moving tasks)
77
81
 
78
82
  1. Whether a standing signed payout rule satisfies the attributable-action requirement (Art. I).
@@ -0,0 +1,71 @@
1
+ # 0397 — The payment rail is Stripe Connect, one connected account per project; J.P. Morgan Payments is the written fallback
2
+
3
+ - **Status:** Accepted for the choice of rail. Nothing is bought or opened by this record, and the counsel items below still gate every task that moves real money.
4
+ - **Date:** 2026-10-30
5
+ - **Deciders:** The owner chose Stripe on 2026-10-30, after the two options the legal framework names were set side by side. The fallback is the builder's recommendation, recorded because the task asks for one.
6
+ - **Tasks:** [task 1004906](https://cloudbongos.com/builders#/task/1004906) (this decision). Unblocks the money tasks behind it in goal 1000092.
7
+ - **Interacts with:** [ADR 0385](0385-money-lives-with-a-processor-credits-stay-a-project-meter.md) (the per-flow map and the pay-type gates this fills in), [ADR 0388](0388-a-module-sale-is-split-by-the-project-the-buyer-pays-the-platform-fee.md) (the buyer-paid fee), [ADR 0392](0392-ai-generation-runs-on-a-processor-held-balance-and-the-builders-own-keys.md) (processor-held balance for AI generation).
8
+
9
+ The owner's legal framework is a confidential draft. This record cites it by Article only. It is a product constraint for building, not legal advice, and it does not answer the counsel items listed at the end.
10
+
11
+ ## Context
12
+
13
+ [ADR 0385](0385-money-lives-with-a-processor-credits-stay-a-project-meter.md) decided that a licensed processor, never Bongos, holds all user and project money, and left the processor itself to this task. The framework names two: Stripe Connect and J.P. Morgan Payments. The task asks for the cheapest option the framework permits, a fallback, and a comparison on cost, payout speed, failure handling and who files suspicious-activity reports. Nothing here is purchased without the owner's go-ahead.
14
+
15
+ ## Decision
16
+
17
+ **1. The rail is Stripe Connect.** Both options keep funds with a licensed institution and so both satisfy Art. II. Stripe is chosen because it is the cheaper and faster one to start: no sales process or minimum volume to open, the marketplace pieces ADR 0385 needs already exist as products (below), and a builder can be built against it with the platform's own test mode before any account is opened.
18
+
19
+ **2. Account structure: one connected account per project, and one per payee.** A project's money sits in that project's own connected account, held by Stripe, not in a balance owned by Cloud Bongos. A builder or contributor who is paid gets their own connected account, onboarded through the processor's hosted flow, which is also where identity, tax details, age and sanctions screening are collected (Art. VII, X, XI). Bongos stores the processor's account and transfer identifiers and its own append-only record of each movement and its cause, and never a balance it could spend. A balance on screen is a read of the processor's figure.
20
+
21
+ **3. Each ADR 0385 flow maps to a Stripe Connect primitive.** The exact product for each row is confirmed against Stripe's current documentation when its build task starts; this table names the intended primitive so a flow with none is redesigned, not custom-built.
22
+
23
+ | Flow | Stripe Connect primitive |
24
+ | --- | --- |
25
+ | Project funding | A charge to the funder, settled into the project's connected account |
26
+ | Balance view | A read of the connected account's balance |
27
+ | User-to-user payment | A transfer between connected accounts, on the payer's instruction |
28
+ | Builder payout | A transfer from the project's connected account to the builder's, under the signed rule |
29
+ | Contractor pay (our own) | The same transfer, with Cloud Bongos acting as a project through its own connected account |
30
+ | Cash-out | A payout from the connected account to the user's bank |
31
+ | Module sale | A charge to the buyer with an application fee, then transfers to the seller and contributors (ADR 0388) |
32
+
33
+ **4. The cheapest permitted option is Stripe's standard published pricing at account opening.** The rates are not recorded here, because they change and because opening an account is the owner's act. The build tasks must read the rate from the account, never copy a number into code. J.P. Morgan Payments is priced by negotiation, so no cheaper figure can be shown for it without a sales conversation, and none was started.
34
+
35
+ **5. Fallback: J.P. Morgan Payments.** It is the framework's other named rail and suits large volumes and bank-grade requirements. It is not the start because it normally comes with an onboarding process and volume expectations that the first payouts do not meet. The fallback applies if Stripe declines or restricts the platform, if payout reach or fees stop working for the volume, or if counsel's answer to item 3 needs a structure Stripe's account types do not offer. Every money-moving task keeps its processor calls behind one module boundary so a rail change replaces one adapter, not the product.
36
+
37
+ **6. Who watches for suspicious activity.** The processor is the licensed party that monitors its accounts and files any required reports on money it holds. Bongos does not file on the processor's behalf and does not claim to. Bongos's own duties, such as holding a payout when a screen flags it and telling the person, stay as ADR 0385 decision 8 and the payout-gate tasks define them. Counsel confirms this split (item 3).
38
+
39
+ **7. Failure handling.** A failed or returned transfer is a recorded movement with its reason, never a silent retry or a deletion. Bongos keeps its record and the processor's record side by side and checks them daily (a later task), with an alarm on drift. A payout the processor holds or rejects is shown to the person as held, with the reason the processor gives, and nothing is re-sent on its own.
40
+
41
+ ## Comparison
42
+
43
+ | | Stripe Connect | J.P. Morgan Payments |
44
+ | --- | --- | --- |
45
+ | Cost to start | Standard published rates, no minimum to open | Negotiated; typically a sales process first |
46
+ | Payout speed | Standard payouts in days by default; faster options exist | Strong bank rails; set by the agreement |
47
+ | Marketplace pieces (connected accounts, hosted onboarding, application fees, transfers) | Built in | Possible, with more integration work |
48
+ | Who monitors the held money | Stripe | JPMorgan |
49
+ | Fit for first payouts | Yes | Later, at volume |
50
+
51
+ Cost and speed rows describe how the two are generally offered. They were not quoted live for this record, and the first Stripe account's actual terms win over this table.
52
+
53
+ ## Consequences
54
+
55
+ - [task 1003182](https://cloudbongos.com/builders#/task/1003182), [task 1003183](https://cloudbongos.com/builders#/task/1003183), [task 1004907](https://cloudbongos.com/builders#/task/1004907), [task 1004910](https://cloudbongos.com/builders#/task/1004910) and [task 1004911](https://cloudbongos.com/builders#/task/1004911) now name Stripe Connect as the primitive they map to.
56
+ - No money-moving task ships before the owner opens the account and counsel clears items 1 to 4 of ADR 0385.
57
+ - A processor adapter module is the only place that may name Stripe. Nothing else calls it directly.
58
+ - Test mode first. No live key is created or stored by this task.
59
+
60
+ ## Held for counsel (unchanged by this record)
61
+
62
+ 1. Whether a standing signed payout rule satisfies the attributable-action requirement (Art. I).
63
+ 2. Whether a credit-weighted pool distribution creates stored value, a security or a wage-style fee problem.
64
+ 3. Agent-of-payee versus full pass-through, which account type that implies, and the exact split of monitoring duties in decision 6.
65
+ 4. Which entity collects the fee and which is the payee's agent.
66
+
67
+ ## Rejected
68
+
69
+ - **J.P. Morgan Payments first.** Slower and dearer to start for volumes this small; kept as the fallback.
70
+ - **One platform-owned Stripe balance for every project.** Makes Cloud Bongos the holder of project money (Art. II).
71
+ - **Building our own ledger of user balances.** Same custody problem, and a second source of truth that can drift from the processor's.
@@ -512,3 +512,4 @@ These 20 numbers are each shared by exactly two files. They are **accepted histo
512
512
  | 0396 | [**Google sign-in: a stand-in login, one chooser, and a CLI sign-in approved in the browser** ([task 1004993](https://cloudbongos.com/builders#/task/1004993)). A Google-only person gets `~<handle>` as the core builder login, a value no GitHub login can be, and never on the hub record; they are found by Google's own id through the hub, never an email. Every sign-in link shows Continue with GitHub / Continue with Google; the CLI sign-in is approved on this site's own page from the browser cookie. Projects cannot take a Google-only person until task 1004994.](0396-google-sign-in-a-stand-in-login-and-a-browser-approved-cli-sign-in.md) | identity / sign-in |
513
513
  | 0394 | [**Market Watch searches the web through the Messages API on the project's own key, and runs from its own clock-anchored poller** ([task 1004934](https://cloudbongos.com/builders#/task/1004934) · goal 1000137). Not the grade port: the server image has no `claude` CLI, and a measured tool-enabled run costs the same ($0.106 per item). One Sonnet 5 call per item with bounded web search and fetch, on an owner-set key in Settings (the project pays the provider; Bongos holds no money); an hourly, ledger-due, resumable poller on the daily-checks pattern, not the abandoned cron-router; capped per item before it starts and fail closed; about $4–5 per weekly 40-item run.](0394-market-watch-searches-through-the-messages-api-on-the-projects-key-and-runs-from-its-own-poller.md) | modules / economy |
514
514
  | 0395 | [**A task says what it needs, and each person's lists show only what they can do** ([task 1004950](https://cloudbongos.com/builders#/task/1004950)). `tasks.needs` ⊆ {owner, server} is its own set, not an `automation_tag` value (that one says whether work runs unattended). Capabilities are read fresh like rank: `owner` from the owner seat (founding builder fallback, the UAT reading), `server` from `builders.capability_grants`, set only by the owner. The recommend lists (claimable feed, optimizer, autonomous runner) show only tasks whose needs the viewer holds; the runner never holds owner. The claim refuses only `server` (`NEEDS_SERVER_ACCESS`, all three surfaces). Visibility elsewhere is unchanged; the board filters by need.](0395-a-task-says-what-it-needs-and-lists-show-only-what-you-can-do.md) | lifecycle / work tracking |
515
+ | 0397 | [**The payment rail is Stripe Connect, one connected account per project; J.P. Morgan Payments is the fallback** ([task 1004906](https://cloudbongos.com/builders#/task/1004906), goal 1000092). The owner chose Stripe on 2026-10-30. Each project holds its money in its own connected account and each payee has one, so Cloud Bongos holds nothing (ADR 0385). Every flow in the ADR 0385 map is named against a Stripe primitive; a processor adapter module is the only place that names Stripe, so the fallback replaces one adapter. The processor is the party that monitors the money it holds. Test mode first; no live key is created, and counsel items 1 to 4 still gate real money.](0397-the-payment-rail-is-stripe-connect-with-one-connected-account-per-project.md) | economy / payments |