@bongos/core 1.23.22 → 1.24.2
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 +933 -413
- package/.claude/skills/blocker-review/SKILL.md +9 -1
- package/.claude/skills/blocker-solve/SKILL.md +1 -1
- package/.claude/skills/builder-claim/SKILL.md +1 -1
- package/.claude/skills/builder-reauth/SKILL.md +1 -1
- package/.claude/skills/builder-redteam/SKILL.md +1 -1
- package/.claude/skills/builder-sequence/SKILL.md +1 -1
- package/.claude/skills/builder-setup/SKILL.md +1 -1
- package/.claude/skills/builder-ship/SKILL.md +1 -1
- package/.claude/skills/collab-review/SKILL.md +5 -2
- package/.claude/skills/design/SKILL.md +1 -1
- package/.claude/skills/goal-create/SKILL.md +2 -2
- package/.claude/skills/grade-recover/SKILL.md +1 -1
- package/.claude/skills/merge-mode/SKILL.md +1 -1
- package/.claude/skills/owner-review/SKILL.md +1 -1
- package/.claude/skills/planning-session/SKILL.md +11 -11
- package/.claude/skills/read-session-export/SKILL.md +1 -1
- package/.claude/skills/recall/SKILL.md +1 -1
- package/.claude/skills/scan-before-install/SKILL.md +1 -1
- package/.claude/skills/session-handoff/SKILL.md +1 -1
- package/.claude/skills/strand-fix/SKILL.md +13 -0
- package/.claude/skills/worktree-clean/SKILL.md +1 -1
- package/AGENTS.md +15 -0
- package/GEMINI.md +5 -0
- package/clients/bongos-client/README.md +1 -1
- package/clients/bongos-client/bongos-client.global.js +96 -0
- package/clients/bongos-client/index.cjs +96 -0
- package/clients/bongos-client/index.d.ts +155 -4
- package/clients/bongos-client/index.mjs +96 -0
- package/docs/adr/0054-session-token-reward-cost-plus.md +3 -1
- package/docs/adr/0055-server-mediated-branch-publish.md +1 -1
- package/docs/adr/0385-money-lives-with-a-processor-credits-stay-a-project-meter.md +12 -1
- package/docs/adr/0393-a-platform-account-is-a-person-and-github-is-one-way-in.md +37 -0
- package/docs/adr/0394-market-watch-searches-through-the-messages-api-on-the-projects-key-and-runs-from-its-own-poller.md +102 -0
- package/docs/adr/0395-a-task-says-what-it-needs-and-lists-show-only-what-you-can-do.md +36 -0
- package/docs/adr/0396-google-sign-in-a-stand-in-login-and-a-browser-approved-cli-sign-in.md +41 -0
- package/docs/adr/README.md +6 -2
- package/docs/api/openapi.json +8651 -5833
- package/docs/api-reference.md +66 -10
- package/docs/architecture.md +37 -1
- package/docs/canonical-permissions.md +1 -1
- package/docs/copy-inventory.md +427 -339
- package/docs/copy-registry.json +1376 -500
- package/docs/file-map.md +1 -0
- package/docs/module-api-changelog.md +7 -0
- package/docs/onboarding/diagrams/03-drachmae-karma.mmd +3 -3
- package/docs/onboarding/diagrams/README.md +1 -1
- package/docs/onboarding/drachmae-and-karma.md +15 -15
- package/docs/onboarding/primer.md +2 -2
- package/docs/page-inventory.json +57 -7
- package/docs/page-readings.json +1210 -1027
- package/docs/recipes/google-sign-in.md +60 -0
- package/docs/recipes/ops-gotchas.md +1 -1
- package/migrations/core_282_builders_lower_login_idx.sql +33 -0
- package/migrations/core_283_claimable_ignores_page_markers.sql +53 -0
- package/migrations/core_283_payout_approvals.sql +183 -0
- package/migrations/core_284_payout_gates.sql +179 -0
- package/migrations/core_285_task_needs.sql +74 -0
- package/modules/ai-studio/billing.js +67 -0
- package/modules/ai-studio/context.js +29 -0
- package/modules/ai-studio/db.js +172 -0
- package/modules/ai-studio/gemini.js +75 -0
- package/modules/ai-studio/generate.js +119 -0
- package/modules/ai-studio/keys.js +73 -0
- package/modules/ai-studio/migrations/ai_studio_001_keys.sql +22 -0
- package/modules/ai-studio/migrations/ai_studio_002_ledger.sql +48 -0
- package/modules/ai-studio/migrations/ai_studio_003_requests.sql +55 -0
- package/modules/ai-studio/openrouter.js +90 -0
- package/modules/ai-studio/payments.js +105 -0
- package/modules/ai-studio/pricing.js +92 -0
- package/modules/ai-studio/routes/ai-studio.js +235 -5
- package/modules/ai-studio/studio.js +121 -0
- package/modules/autonomy/fence.js +64 -1
- package/modules/builder-settings/builder-needs.js +27 -1
- package/modules/copy-desk/routes/copy-desk.js +5 -0
- package/modules/economy/achievements.js +22 -10
- package/modules/economy/cost-classify.js +9 -0
- package/modules/economy/cost-write-guard.js +52 -0
- package/modules/economy/cost.js +2 -1
- package/modules/economy/credits.js +18 -15
- package/modules/economy/goal-reward.js +161 -0
- package/modules/economy/reward.js +4 -0
- package/modules/economy/routes/cost.js +33 -7
- package/modules/government/access-routes.js +70 -0
- package/modules/government/access.js +88 -0
- package/modules/government/asks.js +5 -2
- package/modules/government/catalog.js +6 -0
- package/modules/government/db.js +72 -0
- package/modules/government/docket.js +48 -2
- package/modules/government/migrations/government_035_payout_approve.sql +29 -0
- package/modules/government/migrations/government_036_access_holders.sql +33 -0
- package/modules/government/pollers/board-expiry.js +108 -20
- package/modules/government/protected-surfaces.json +1 -0
- package/modules/government/routes/government.js +31 -0
- package/modules/government/routing.js +49 -7
- package/modules/government/waiting.js +78 -0
- package/modules/hall-ui/public/ai-studio-lib.js +268 -0
- package/modules/hall-ui/public/ai-studio.css +193 -0
- package/modules/hall-ui/public/ai-studio.html +98 -0
- package/modules/hall-ui/public/ai-studio.js +556 -0
- package/modules/hall-ui/public/ai-studio.states.json +94 -0
- package/modules/hall-ui/public/blockers-by-person.js +158 -0
- package/modules/hall-ui/public/blockers-lib.js +15 -1
- package/modules/hall-ui/public/blockers.html +8 -0
- package/modules/hall-ui/public/blockers.js +1 -1
- package/modules/hall-ui/public/claim-action.js +3 -0
- package/modules/hall-ui/public/collab.html +12 -0
- package/modules/hall-ui/public/craft-mode.js +4 -1
- package/modules/hall-ui/public/criterion-uat-ui.js +4 -1
- package/modules/hall-ui/public/drachmae.html +1 -1
- package/modules/hall-ui/public/genesis/r5-life-1-primordial-sea.jpg +0 -0
- package/modules/hall-ui/public/genesis/r5-life-2-first-cells-cut.webp +0 -0
- package/modules/hall-ui/public/genesis/r5-life-2-first-cells.jpg +0 -0
- package/modules/hall-ui/public/genesis/r5-life-3-genome-cut.webp +0 -0
- package/modules/hall-ui/public/genesis/r5-life-3-genome.jpg +0 -0
- package/modules/hall-ui/public/genesis/r5-life-4-membrane-cut.webp +0 -0
- package/modules/hall-ui/public/genesis/r5-life-4-membrane.jpg +0 -0
- package/modules/hall-ui/public/genesis/r5-life-5-nervous-system-cut.webp +0 -0
- package/modules/hall-ui/public/genesis/r5-life-5-nervous-system.jpg +0 -0
- package/modules/hall-ui/public/goal-inbox.js +1 -1
- package/modules/hall-ui/public/goals-render.js +4 -0
- package/modules/hall-ui/public/goals.html +8 -0
- package/modules/hall-ui/public/gov-living.js +6 -2
- package/modules/hall-ui/public/government-access.js +108 -0
- package/modules/hall-ui/public/government.html +21 -0
- package/modules/hall-ui/public/hall-ask.css +5 -0
- package/modules/hall-ui/public/hall-ask.js +39 -3
- package/modules/hall-ui/public/notes-panel.css +20 -0
- package/modules/hall-ui/public/notes-panel.js +146 -0
- package/modules/hall-ui/public/project-settings.html +1 -1
- package/modules/hall-ui/public/project-settings.js +7 -5
- package/modules/hall-ui/public/settings-ai-keys.js +124 -0
- package/modules/hall-ui/public/settings.html +15 -0
- package/modules/hall-ui/public/street-deck.js +12 -3
- package/modules/hall-ui/public/studio.css +90 -8
- package/modules/hall-ui/public/studio.html +39 -10
- package/modules/hall-ui/public/studio.js +148 -18
- package/modules/hall-ui/public/task.html +2 -0
- package/modules/hall-ui/public/task.js +4 -0
- package/modules/hall-ui/public/tweak-editor.js +12 -3
- package/modules/hall-ui/public/welcome-boot.css +42 -6
- package/modules/hall-ui/public/welcome-boot.js +20 -6
- package/modules/hall-ui/public/work.js +20 -0
- package/modules/hall-ui/records/ai-studio.md +36 -0
- package/modules/hall-ui/records/blockers-people.md +38 -0
- package/modules/lifecycle/db-claims.js +32 -4
- package/modules/lifecycle/db-goals.js +18 -5
- package/modules/lifecycle/db-tasks.js +15 -6
- package/modules/lifecycle/done-when.js +23 -1
- package/modules/lifecycle/lifecycle.js +5 -0
- package/modules/lifecycle/migrations/lifecycle_017_notes.sql +46 -0
- package/modules/lifecycle/module.json +2 -1
- package/modules/lifecycle/notes.js +219 -0
- package/modules/lifecycle/page-notice.js +124 -0
- package/modules/lifecycle/page-tweak-artist.js +18 -1
- package/modules/lifecycle/publish-reconciler.js +67 -20
- package/modules/lifecycle/routes/claims.js +5 -2
- package/modules/lifecycle/routes/goals.js +3 -1
- package/modules/lifecycle/routes/notes.js +91 -0
- package/modules/lifecycle/routes/project-settings.js +43 -35
- package/modules/lifecycle/routes/task-route-helpers.js +21 -0
- package/modules/lifecycle/routes/task-write-routes.js +21 -3
- package/modules/lifecycle/routes/tasks.js +12 -12
- package/modules/lifecycle/task-needs-gate.js +70 -0
- package/modules/market-watch/CLAUDE.md +15 -0
- package/modules/market-watch/db.js +340 -0
- package/modules/market-watch/key.js +58 -0
- package/modules/market-watch/migrations/market_watch_001_tables.sql +249 -0
- package/modules/market-watch/migrations/market_watch_002_run.sql +46 -0
- package/modules/market-watch/module.json +26 -0
- package/modules/market-watch/pollers/hub-seed.js +54 -0
- package/modules/market-watch/pollers/weekly-run.js +100 -0
- package/modules/market-watch/research.js +350 -0
- package/modules/market-watch/run.js +245 -0
- package/modules/market-watch/seed/market-data.json +38 -0
- package/modules/market-watch/seed/partners-data.json +497 -0
- package/modules/market-watch/seed.js +252 -0
- package/modules/market-watch/store.js +230 -0
- package/modules/memory/routes/memory.js +14 -2
- package/modules/memory/routes/search.js +8 -2
- package/modules/platform-identity/account-logins.js +192 -0
- package/modules/platform-identity/migrations/platform_identity_034_account_logins.sql +96 -0
- package/modules/platform-identity/platform-identity.js +5 -4
- package/modules/platform-identity/routes/my-projects.js +6 -0
- package/modules/platform-identity/routes/profile.js +18 -0
- package/modules/platform-identity/routes/public-profile.js +10 -1
- package/modules/platform-identity/routes/sso.js +26 -1
- package/modules/platform-identity/tests/platform-identity.mjs +2 -1
- package/modules/provisioning/credential-preflight.js +13 -3
- package/modules/provisioning/pollers/app-liveness.js +25 -5
- package/modules/provisioning/routes/provisioning.js +1 -1
- package/modules/provisioning/starter-bundles.js +6 -2
- package/modules/public-landing/public/account.html +10 -2
- package/modules/public-landing/public/assets/world/r2-bongos-chrome-b.jpg +0 -0
- package/modules/public-landing/public/assets/world/r2-bongos-chrome-b.jpg.json +1 -1
- package/modules/public-landing/public/assets/world/r2-bongos-chrome-b.webp +0 -0
- package/modules/public-landing/public/assets/world/r2-bongos-chrome-b.webp.json +1 -1
- package/modules/public-landing/public/assets/world/r2-chrome-blob-one-cut.webp +0 -0
- package/modules/public-landing/public/assets/world/r2-chrome-blob-one-cut.webp.json +1 -1
- package/modules/public-landing/public/assets/world/r2-chrome-blob-one.jpg +0 -0
- package/modules/public-landing/public/assets/world/r2-chrome-blob-one.jpg.json +1 -1
- package/modules/public-landing/public/assets/world/r2-chrome-blob-one.webp +0 -0
- package/modules/public-landing/public/assets/world/r2-chrome-blob-one.webp.json +1 -1
- package/modules/public-landing/public/assets/world/r2-chrome-blobs-set.jpg +0 -0
- package/modules/public-landing/public/assets/world/r2-chrome-blobs-set.jpg.json +1 -1
- package/modules/public-landing/public/assets/world/r2-chrome-blobs-set.webp +0 -0
- package/modules/public-landing/public/assets/world/r2-chrome-blobs-set.webp.json +1 -1
- package/modules/public-landing/public/assets/world/r3-frost-bead-cut.webp +0 -0
- package/modules/public-landing/public/assets/world/r3-frost-bead-cut.webp.json +1 -1
- package/modules/public-landing/public/assets/world/r3-frost-pair-cut.webp +0 -0
- package/modules/public-landing/public/assets/world/r3-frost-pair-cut.webp.json +1 -1
- package/modules/public-landing/public/assets/world/r3-gold-blob-cut.webp +0 -0
- package/modules/public-landing/public/assets/world/r3-gold-blob-cut.webp.json +1 -1
- package/modules/public-landing/public/assets/world/r3-gold-pair-cut.webp +0 -0
- package/modules/public-landing/public/assets/world/r3-gold-pair-cut.webp.json +1 -1
- package/modules/public-landing/public/assets/world/r3-obsidian-blob-cut.webp +0 -0
- package/modules/public-landing/public/assets/world/r3-obsidian-blob-cut.webp.json +1 -1
- package/modules/public-landing/public/assets/world/r3-obsidian-pair-cut.webp +0 -0
- package/modules/public-landing/public/assets/world/r3-obsidian-pair-cut.webp.json +1 -1
- package/modules/public-landing/public/assets/world/r3-space-nebula.jpg +0 -0
- package/modules/public-landing/public/assets/world/r3-space-nebula.jpg.json +1 -1
- package/modules/public-landing/public/assets/world/r4-card-chrome.jpg +0 -0
- package/modules/public-landing/public/assets/world/r4-card-chrome.jpg.json +1 -1
- package/modules/public-landing/public/assets/world/r4-card-nebula.jpg +0 -0
- package/modules/public-landing/public/assets/world/r4-card-nebula.jpg.json +1 -1
- package/modules/public-landing/public/assets/world/r5-life-1-primordial-sea.jpg +0 -0
- package/modules/public-landing/public/assets/world/r5-life-1-primordial-sea.jpg.json +1 -1
- package/modules/public-landing/public/assets/world/r5-life-2-first-cells-cut.webp +0 -0
- package/modules/public-landing/public/assets/world/r5-life-2-first-cells-cut.webp.json +1 -1
- package/modules/public-landing/public/assets/world/r5-life-2-first-cells.jpg +0 -0
- package/modules/public-landing/public/assets/world/r5-life-2-first-cells.jpg.json +1 -1
- package/modules/public-landing/public/assets/world/r5-life-3-genome-cut.webp +0 -0
- package/modules/public-landing/public/assets/world/r5-life-3-genome-cut.webp.json +1 -1
- package/modules/public-landing/public/assets/world/r5-life-3-genome.jpg +0 -0
- package/modules/public-landing/public/assets/world/r5-life-3-genome.jpg.json +1 -1
- package/modules/public-landing/public/assets/world/r5-life-4-membrane-cut.webp +0 -0
- package/modules/public-landing/public/assets/world/r5-life-4-membrane-cut.webp.json +1 -1
- package/modules/public-landing/public/assets/world/r5-life-4-membrane.jpg +0 -0
- package/modules/public-landing/public/assets/world/r5-life-4-membrane.jpg.json +1 -1
- package/modules/public-landing/public/assets/world/r5-life-5-nervous-system-cut.webp +0 -0
- package/modules/public-landing/public/assets/world/r5-life-5-nervous-system-cut.webp.json +1 -1
- package/modules/public-landing/public/assets/world/r5-life-5-nervous-system.jpg +0 -0
- package/modules/public-landing/public/assets/world/r5-life-5-nervous-system.jpg.json +1 -1
- package/modules/public-landing/public/community.html +1 -1
- package/modules/public-landing/public/connections.html +2 -2
- package/modules/public-landing/public/guild.html +1 -1
- package/modules/public-landing/public/invitations.html +2 -2
- package/modules/public-landing/public/projects.html +5 -5
- package/modules/raise/views/nda.html +2 -0
- package/modules/specialities/db.js +32 -1
- package/modules/specialities/routes/specialities.js +10 -6
- package/modules/status-ui/public/index.html +1 -1
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/release-notes.json +230 -0
- package/scripts/bongos/autobongos-tweak-lane.js +46 -1
- package/scripts/bongos/backfill-subagent-rewards.js +2 -2
- package/scripts/bongos/claim.js +22 -1
- package/scripts/bongos/db-backup-nightly.sh +29 -0
- package/scripts/bongos/deploy-divergence.js +7 -0
- package/scripts/bongos/doc-cli-guard.js +6 -0
- package/scripts/bongos/fitness.js +3 -2
- package/scripts/bongos/gen-diagrams.js +3 -3
- package/scripts/bongos/government-walk.js +3 -0
- package/scripts/bongos/lib.sh +4 -5
- package/scripts/bongos/migration-namespace.js +13 -1
- package/scripts/bongos/plain-cards.js +4 -0
- package/scripts/bongos/provision-github-setup.js +3 -1
- package/scripts/bongos/provision-units.js +6 -1
- package/scripts/bongos/publish-manifest.js +3 -0
- package/scripts/bongos/release.js +2 -0
- package/scripts/bongos/run-unit-tests.js +268 -82
- package/scripts/bongos/seed-tasks.example.json +56 -0
- package/scripts/bongos/seed-tasks.js +222 -0
- package/scripts/bongos/seed-verify-criteria.js +1 -2
- package/scripts/bongos/ship-finish.js +2 -0
- package/scripts/bongos/ship-resume.js +2 -0
- package/scripts/bongos/strand-lease.js +250 -0
- package/scripts/bongos/strand-watch.js +26 -5
- package/scripts/bongos/version-literal-guard.js +2 -2
- package/scripts/discord/post.js +4 -3
- package/scripts/gds/seed-tasks.js +7 -0
- package/scripts/gds/{build-bongos.js → strand-lease.js} +3 -3
- package/scripts/hall-preview/server.js +21 -0
- package/src/bongos/auth-config.js +29 -1
- package/src/bongos/auth-discord.js +3 -3
- package/src/bongos/auth-github.js +3 -6
- package/src/bongos/auth-google.js +217 -0
- package/src/bongos/device-approval.js +140 -0
- package/src/bongos/llm-pricing.js +17 -1
- package/src/bongos/metrics.js +48 -2
- package/src/bongos/middleware/rate-limit.js +30 -11
- package/src/bongos/module-scope-map.js +12 -1
- package/src/bongos/optimizer.js +15 -1
- package/src/bongos/payout-approvals.js +342 -0
- package/src/bongos/payout-gates.js +364 -0
- package/src/bongos/prelaunch-gate.js +7 -9
- package/src/bongos/prelaunch-switch.js +20 -0
- package/src/bongos/route-rank-check.js +7 -0
- package/src/bongos/routes/auth-google.js +246 -0
- package/src/bongos/routes/auth.js +38 -1
- package/src/bongos/routes/backup.js +33 -9
- package/src/bongos/routes/builders.js +57 -30
- package/src/bongos/routes/github.js +9 -0
- package/src/bongos/routes/me.js +18 -0
- package/src/bongos/routes/my-payouts.js +133 -0
- package/src/bongos/routes/payout-approvals.js +312 -0
- package/src/bongos/routes/payout-gates.js +179 -0
- package/src/bongos/routes.js +15 -1
- package/src/bongos/secret-box.js +18 -3
- package/src/bongos/serve-internal.js +47 -19
- package/src/bongos/sign-in-pages.js +138 -0
- package/src/bongos/task-needs.js +146 -0
- package/src/bongos-downloads.js +18 -1
- package/src/instance-config.js +28 -0
- package/src/module-api.js +14 -1
- package/tests/access_holders.mjs +214 -0
- package/tests/account_logins.mjs +326 -0
- package/tests/account_logins_db.mjs +161 -0
- package/tests/ai_studio_billing.mjs +253 -0
- package/tests/ai_studio_generate.mjs +282 -0
- package/tests/ai_studio_keys.mjs +159 -0
- package/tests/ai_studio_requests.mjs +319 -0
- package/tests/auth_backchannel_logout_route.mjs +201 -0
- package/tests/auto_satisfy_criteria.mjs +10 -1
- package/tests/autobongos_tweak_lane.mjs +144 -0
- package/tests/autobongos_tweak_pin_identity.mjs +137 -0
- package/tests/backfill_subagent_rewards.mjs +17 -1
- package/tests/backup_trigger_lock.mjs +119 -0
- package/tests/blockers_people.mjs +198 -0
- package/tests/bounded_rate_maps.mjs +184 -0
- package/tests/claimable_blocker_status.mjs +1 -1
- package/tests/claims_batch_routes.mjs +421 -0
- package/tests/config_read_cache.mjs +171 -0
- package/tests/copy_desk_page_editor.mjs +12 -0
- package/tests/cost_write_guard.mjs +200 -0
- package/tests/craft_achievements.mjs +33 -10
- package/tests/criterion_goal_attach.mjs +1 -1
- package/tests/db_backup_nightly.mjs +73 -1
- package/tests/deploy_divergence_line.mjs +7 -0
- package/tests/effective_visibility_predicate.mjs +12 -0
- package/tests/fitness.mjs +19 -0
- package/tests/fixtures/seed-tasks/bongos-v1-idea-routing.json +256 -0
- package/tests/fixtures/seed-tasks/bv1-profiles.json +592 -0
- package/tests/fixtures/seed-tasks/bv2-ideator-surface.json +373 -0
- package/tests/fixtures/seed-tasks/fake-api.mjs +80 -0
- package/tests/github_one_trip.mjs +34 -0
- package/tests/github_repo_visibility.mjs +20 -0
- package/tests/goal_achievement.mjs +30 -1
- package/tests/goal_achievement_reward.mjs +205 -0
- package/tests/goal_sort_staleness.mjs +2 -1
- package/tests/goal_tier.mjs +11 -1
- package/tests/google_fonts_nonblocking.mjs +84 -0
- package/tests/google_sign_in.mjs +401 -0
- package/tests/government_board_expiry.mjs +94 -0
- package/tests/government_board_membership.mjs +4 -1
- package/tests/government_protected_surfaces.mjs +1 -1
- package/tests/government_routes.mjs +1 -1
- package/tests/government_seed.mjs +1 -0
- package/tests/hall_ai_studio.mjs +347 -0
- package/tests/hall_page_gate_map.mjs +3 -0
- package/tests/hall_studio_home.mjs +61 -2
- package/tests/home_attention_cards.mjs +1 -1
- package/tests/human_signal.mjs +141 -0
- package/tests/install_script_reader.mjs +51 -0
- package/tests/integration_fixture_ids.mjs +82 -0
- package/tests/invite_expiry_db.mjs +13 -1
- package/tests/lib_sh_resolution.mjs +0 -4
- package/tests/market_watch_data.mjs +244 -0
- package/tests/market_watch_data_db.mjs +308 -0
- package/tests/market_watch_module.mjs +114 -0
- package/tests/market_watch_run.mjs +503 -0
- package/tests/metrics.mjs +124 -0
- package/tests/migration_namespace.mjs +14 -0
- package/tests/module_api.mjs +2 -0
- package/tests/module_loader.mjs +1 -1
- package/tests/notes.mjs +182 -0
- package/tests/own_scope_guard.mjs +5 -0
- package/tests/page_tweak_marker_sql.mjs +76 -0
- package/tests/page_tweak_no_block.mjs +135 -0
- package/tests/page_tweak_notice.mjs +103 -0
- package/tests/payout_approvals.mjs +253 -0
- package/tests/payout_approvals_db.mjs +106 -0
- package/tests/payout_gates.mjs +322 -0
- package/tests/payout_gates_db.mjs +113 -0
- package/tests/planning_session_skill.mjs +13 -3
- package/tests/project_settings_page.mjs +29 -5
- package/tests/project_settings_spend_cap_route.mjs +235 -0
- package/tests/promotion_sweep.mjs +29 -1
- package/tests/provision.mjs +3 -2
- package/tests/provisioning_app_status.mjs +18 -0
- package/tests/provisioning_credential_preflight.mjs +53 -0
- package/tests/provisioning_env_manifest_edit_delete.mjs +223 -0
- package/tests/publish_reconciler_overlap.mjs +60 -0
- package/tests/rank_change_broadcast_port.mjs +151 -0
- package/tests/seed_tasks.mjs +176 -0
- package/tests/seed_verify_criteria.mjs +2 -6
- package/tests/site_classified_once.mjs +142 -0
- package/tests/speciality_db_shape.mjs +23 -0
- package/tests/speciality_session_skills.mjs +48 -2
- package/tests/strand_lease.mjs +249 -0
- package/tests/strand_watch.mjs +10 -0
- package/tests/task_criteria_routes.mjs +275 -0
- package/tests/task_criteria_unlink_db.mjs +123 -0
- package/tests/task_needs.mjs +233 -0
- package/tests/task_needs_db.mjs +110 -0
- package/tests/unit_runner_serial.mjs +266 -43
- package/tests/version_literals.mjs +5 -7
- package/tests/welcome_boot.mjs +16 -5
- package/tests/welcome_boot_browser.mjs +36 -4
- package/docs/recipes/bongos-cli-release.md +0 -66
- package/scripts/bongos/backfill-disciplines.js +0 -144
- package/scripts/bongos/backfill-session-earnings.js +0 -123
- package/scripts/bongos/backfill-session-types.js +0 -87
- package/scripts/bongos/build-bongos.js +0 -94
- package/scripts/bongos/cleanup-orphans.js +0 -74
- package/scripts/bongos/seed-bongos-v1-idea-routing-tasks.js +0 -152
- package/scripts/bongos/seed-bv1-profiles-tasks.js +0 -135
- package/scripts/bongos/seed-bv2-ideator-surface-tasks.js +0 -390
- package/scripts/bongos/smoke-batch-claim.sh +0 -238
- package/scripts/bongos/smoke-batch-release.sh +0 -316
- package/scripts/bongos/smoke-claim-consistency.sh +0 -222
- package/scripts/bongos/smoke-dependencies.sh +0 -143
- package/scripts/gds/backfill-disciplines.js +0 -7
- package/scripts/gds/backfill-session-earnings.js +0 -7
- package/scripts/gds/backfill-session-types.js +0 -7
- package/scripts/gds/cleanup-orphans.js +0 -7
- package/scripts/gds/seed-bongos-v1-idea-routing-tasks.js +0 -6
- package/scripts/gds/seed-bv1-profiles-tasks.js +0 -6
- package/scripts/gds/seed-bv2-ideator-surface-tasks.js +0 -6
- package/scripts/gds/smoke-batch-claim.sh +0 -8
- package/scripts/gds/smoke-batch-release.sh +0 -8
- package/scripts/gds/smoke-claim-consistency.sh +0 -8
- package/scripts/gds/smoke-dependencies.sh +0 -8
- package/tests/smoke_dependencies_witness.mjs +0 -46
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. 634 endpoints across 104 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`.
|
|
@@ -43,11 +43,22 @@ Base path: `/api/bongos`. Ranks (enforced server-side, [ADR 0016](adr/0016-trust
|
|
|
43
43
|
| POST | `/api/bongos/agents/:name/enable` | `metic+archon` | — | POST /agents/:name/enable — THE OPERATOR ACT. |
|
|
44
44
|
| POST | `/api/bongos/agents/:name/invoke` | `any-builder` | `input` | POST /agents/:name/invoke — fire an on-demand agent. |
|
|
45
45
|
|
|
46
|
-
## `ai-studio` (
|
|
46
|
+
## `ai-studio` (12)
|
|
47
47
|
|
|
48
48
|
| Method | Path | Rank | Body | Description |
|
|
49
49
|
|---|---|---|---|---|
|
|
50
|
+
| GET | `/api/bongos/ai-studio/balance` | `any-builder` | — | |
|
|
51
|
+
| GET | `/api/bongos/ai-studio/files/:id` | `any-builder` | — | |
|
|
52
|
+
| GET | `/api/bongos/ai-studio/keys` | `any-builder` | — | |
|
|
53
|
+
| PUT | `/api/bongos/ai-studio/keys/:provider` | `any-builder` | `key` | |
|
|
54
|
+
| DELETE | `/api/bongos/ai-studio/keys/:provider` | `any-builder` | — | |
|
|
55
|
+
| GET | `/api/bongos/ai-studio/requests` | `any-builder` | — | |
|
|
56
|
+
| POST | `/api/bongos/ai-studio/requests` | `any-builder` | `prompt`, `file_ids`, `pay_with` | |
|
|
57
|
+
| GET | `/api/bongos/ai-studio/requests/:id` | `any-builder` | — | |
|
|
50
58
|
| GET | `/api/bongos/ai-studio/status` | `any-builder` | — | |
|
|
59
|
+
| POST | `/api/bongos/ai-studio/topup` | `any-builder` | `amount_usd` | Top up the processor-held balance. |
|
|
60
|
+
| GET | `/api/bongos/ai-studio/topup/quote` | `any-builder` | — | What a top-up of amount_usd would charge the card, before anything is paid (task 1004921): the Studio shows "your card is charged $20.91"… |
|
|
61
|
+
| POST | `/api/bongos/ai-studio/uploads` | `any-builder` | `content_type`, `data`, `name` | One file per call, so a request body stays small; the global 64 KB parser skips this path (src/bongos/routes.js) and this parser takes it. |
|
|
51
62
|
|
|
52
63
|
## `analytics` (1)
|
|
53
64
|
|
|
@@ -67,18 +78,22 @@ Base path: `/api/bongos`. Ranks (enforced server-side, [ADR 0016](adr/0016-trust
|
|
|
67
78
|
|---|---|---|---|---|
|
|
68
79
|
| GET | `/api/bongos/audit-log` | `metic+archon` | — | GET /api/bongos/audit-log?limit=&offset=&builder_id=&method= Paginated, newest-first. |
|
|
69
80
|
|
|
70
|
-
## `auth` (
|
|
81
|
+
## `auth` (19)
|
|
71
82
|
|
|
72
83
|
| Method | Path | Rank | Body | Description |
|
|
73
84
|
|---|---|---|---|---|
|
|
74
85
|
| POST | `/api/bongos/auth/backchannel-logout` | `public` | `logout_token` | POST /auth/backchannel-logout — the INSTANCE side of federated single-logout (ADR 0144, task 1002238). |
|
|
75
86
|
| POST | `/api/bongos/auth/cli-token/issue` | `any-builder` | — | POST /auth/cli-token/issue — V3.R91 / task 401. |
|
|
87
|
+
| GET | `/api/bongos/auth/device` | `public` | — | shows a terminal's pending sign-in; approving it is the POST below. |
|
|
88
|
+
| POST | `/api/bongos/auth/device/approve` | `any-builder` | `user_code`, `decision` | (own identity only) — mints a CLI session for the signed-in person themselves, from their browser cookie, never from a bearer (the /auth/… |
|
|
76
89
|
| POST | `/api/bongos/auth/device/exchange` | `public` | `assertion` | POST /auth/device/exchange — CLI federation (ADR 0141 §1). |
|
|
77
90
|
| POST | `/api/bongos/auth/device/poll` | `public` | `device_code` | auth flow; the device code itself is the bearer. |
|
|
78
91
|
| POST | `/api/bongos/auth/device/start` | `public` | — | /auth/device — CLI flow rank: public — auth flow itself; identity establishment, not authorization. |
|
|
79
92
|
| GET | `/api/bongos/auth/discord/callback` | `any-builder` | — | completes the link to the caller's own identity. |
|
|
80
93
|
| GET | `/api/bongos/auth/discord/start` | `any-builder` | — | /auth/discord — account-linking OAuth (Phase 3 F2, ADR 0033 §2). |
|
|
81
94
|
| POST | `/api/bongos/auth/discord/unlink` | `any-builder` | — | unlink your OWN Discord. |
|
|
95
|
+
| GET | `/api/bongos/auth/google/callback` | `public` | — | OAuth callback; the state cookie + code are the bearer. |
|
|
96
|
+
| GET | `/api/bongos/auth/google/start` | `public` | — | entry into the Google OAuth handshake; identity establishment only. |
|
|
82
97
|
| POST | `/api/bongos/auth/logout` | `any-builder` | — | own session, no rank gate (a Xenos can log themselves out). |
|
|
83
98
|
| POST | `/api/bongos/auth/revoke` | `archon` | `session_id` | POST /auth/revoke — V3.R38 / task 259. |
|
|
84
99
|
| POST | `/api/bongos/auth/revoke-all` | `archon` | `builder_id` | POST /auth/revoke-all — V3.R38 / task 259. |
|
|
@@ -128,7 +143,7 @@ Base path: `/api/bongos`. Ranks (enforced server-side, [ADR 0016](adr/0016-trust
|
|
|
128
143
|
|---|---|---|---|---|
|
|
129
144
|
| GET | `/api/bongos/bug-attachments/:name` | `any-builder` | — | GET /api/bongos/bug-attachments/:name — stream one stored image. |
|
|
130
145
|
|
|
131
|
-
## `builders` (
|
|
146
|
+
## `builders` (14)
|
|
132
147
|
|
|
133
148
|
| Method | Path | Rank | Body | Description |
|
|
134
149
|
|---|---|---|---|---|
|
|
@@ -137,6 +152,7 @@ Base path: `/api/bongos`. Ranks (enforced server-side, [ADR 0016](adr/0016-trust
|
|
|
137
152
|
| GET | `/api/bongos/builders/:id/active-claims` | `metic+archon` | — | GET /builders/:id/active-claims — V3.R14 (task 238). |
|
|
138
153
|
| GET | `/api/bongos/builders/:id/activity` | `any-builder` | — | GET /builders/:id/activity — the profile's PER-CRAFT activity log (task 1003281, goal 1000072, criterion legibility-activity-by-role). |
|
|
139
154
|
| PATCH | `/api/bongos/builders/:id/budget` | `metic+archon` | `monthly_budget_usd` | PATCH /builders/:id/budget — set or clear a builder's monthly spend ceiling (V3.R84 task 302, criterion C3). |
|
|
155
|
+
| PATCH | `/api/bongos/builders/:id/capabilities` | `archon` | `server` | PATCH /builders/:id/capabilities — the owner gives or takes a builder's server access (task 1004950, ADR 0395). |
|
|
140
156
|
| GET | `/api/bongos/builders/:id/onboarding` | `public` | — | GET /builders/:id/onboarding — V3.R75 (task 294) onboarding checklist read. |
|
|
141
157
|
| GET | `/api/bongos/builders/:id/profile` | `public` | — | GET /builders/:id/profile — the viewable builder profile page's read (task 1467, goal 25 "bx-identity"). |
|
|
142
158
|
| PATCH | `/api/bongos/builders/:id/rank` | `archon` | `rank` | sole chokepoint that mutates builders.rank; ADR 0016 §enforcement. |
|
|
@@ -337,7 +353,7 @@ Base path: `/api/bongos`. Ranks (enforced server-side, [ADR 0016](adr/0016-trust
|
|
|
337
353
|
| POST | `/api/bongos/goals/:id/requests/:reqId/withdraw` | `any-builder` | — | POST /goals/:id/requests/:reqId/withdraw — the requester cancels their OWN pending join-request (task 1953): the symmetric self-served mi… |
|
|
338
354
|
| POST | `/api/bongos/goals/:id/scope` | `metic+archon` | `add` | POST /goals/:id/scope — "ask to widen": add module(s) to a goal's scope_modules (ADR 0086 §4 / BV1.R64). |
|
|
339
355
|
| GET | `/api/bongos/goals/:id/suggest-criteria` | `any-builder` | — | GET /goals/:id/suggest-criteria?title=&description=&limit= — task 2165. |
|
|
340
|
-
| POST | `/api/bongos/goals/:id/tasks` | `any-builder` | `title`, `description`, `touches`, `est_minutes`, `priority`, `kind`, `discipline`, `value_summary`, `parent_task_id` | POST /goals/:id/tasks — bounded task authoring within a goal's scope (BV1.R60 / ADR 0086 §3). |
|
|
356
|
+
| POST | `/api/bongos/goals/:id/tasks` | `any-builder` | `title`, `description`, `touches`, `est_minutes`, `priority`, `kind`, `discipline`, `value_summary`, `parent_task_id`, `needs` | POST /goals/:id/tasks — bounded task authoring within a goal's scope (BV1.R60 / ADR 0086 §3). |
|
|
341
357
|
| POST | `/api/bongos/goals/:id/transfer` | `any-builder` | `builder_id` | POST /goals/:id/transfer — hand the goal to a new owner (task 1735). |
|
|
342
358
|
| PATCH | `/api/bongos/goals/:id/visibility` | `any-builder` | — | PATCH /goals/:id/visibility — make a goal public\|private (task 1952 / ADR 0112). |
|
|
343
359
|
| POST | `/api/bongos/goals/:id/water` | `any-builder` | — | POST /goals/:id/water — reset a rotting goal's clock. |
|
|
@@ -347,10 +363,13 @@ Base path: `/api/bongos`. Ranks (enforced server-side, [ADR 0016](adr/0016-trust
|
|
|
347
363
|
| 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… |
|
|
348
364
|
| 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). |
|
|
349
365
|
|
|
350
|
-
## `government` (
|
|
366
|
+
## `government` (41)
|
|
351
367
|
|
|
352
368
|
| Method | Path | Rank | Body | Description |
|
|
353
369
|
|---|---|---|---|---|
|
|
370
|
+
| GET | `/api/bongos/government/access` | `any-builder` | — | |
|
|
371
|
+
| POST | `/api/bongos/government/access/:accessKey/holders` | `archon` | — | |
|
|
372
|
+
| DELETE | `/api/bongos/government/access/:accessKey/holders/:builderId` | `archon` | — | |
|
|
354
373
|
| 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. |
|
|
355
374
|
| 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). |
|
|
356
375
|
| 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… |
|
|
@@ -359,6 +378,8 @@ Base path: `/api/bongos`. Ranks (enforced server-side, [ADR 0016](adr/0016-trust
|
|
|
359
378
|
| GET | `/api/bongos/government/assignments` | `archon` | — | government.manage — every builder↔rank assignment row. |
|
|
360
379
|
| POST | `/api/bongos/government/assignments` | `archon` | `builder_id`, `rank_key` | government.manage — assign a CUSTOM rank to a builder. |
|
|
361
380
|
| DELETE | `/api/bongos/government/assignments/:builderId/:rankKey` | `archon` | — | government.manage — remove a custom-rank assignment. |
|
|
381
|
+
| GET | `/api/bongos/government/blockers/for-me` | `any-builder` | — | |
|
|
382
|
+
| GET | `/api/bongos/government/blockers/people` | `any-builder` | — | board.vote.cast — the governor's DOCKET (task 1004523, goal 1000125): ONE read of every matter waiting on, or moving for, a governor, whi… |
|
|
362
383
|
| POST | `/api/bongos/government/board/charter` | `metic+archon` | `form`, `franchise`, `council_rank`, `pass_rule`, `window_minutes`, `rationale_md`, `acknowledge_self_removal` | board.item.open — the genesis charter + legislation choice (task 1004427, spec D10): a form of government and/or its two live settings (f… |
|
|
363
384
|
| POST | `/api/bongos/government/board/decision-rules` | `metic+archon` | `rules`, `rationale_md` | board.item.open — propose a change to WHO DECIDES WHAT (task 1004529): one or more buildings' rows of the decision-rules table, filed as … |
|
|
364
385
|
| GET | `/api/bongos/government/board/genesis-stages` | `any-builder` | — | board.vote.cast — the founding band's read (task 1004429): each genesis stage's latest sitting, and who it is still waiting on under the … |
|
|
@@ -372,7 +393,7 @@ Base path: `/api/bongos`. Ranks (enforced server-side, [ADR 0016](adr/0016-trust
|
|
|
372
393
|
| POST | `/api/bongos/government/buildouts` | `any-builder` | `building`, `capsule`, `name`, `line` | board.vote.cast — a Lead's BUILD-OUT (task 1004711, ADR 0378): a committee room, a new floor, an annex, or growing the building into a di… |
|
|
373
394
|
| GET | `/api/bongos/government/constitution` | `any-builder` | — | board.vote.cast — the Constitution view (R18 of goal 1000069): the live board block plus the full amendment history, passed and returned … |
|
|
374
395
|
| GET | `/api/bongos/government/counts` | `any-builder` | — | board.vote.cast — the government's COUNTS in one read (task 1004716): what is on the viewer ("to do"), what waits on others, what is to d… |
|
|
375
|
-
| GET | `/api/bongos/government/docket` | `any-builder` | — |
|
|
396
|
+
| GET | `/api/bongos/government/docket` | `any-builder` | — | |
|
|
376
397
|
| GET | `/api/bongos/government/laws` | `any-builder` | — | board.vote.cast — the law book (task 1004706): every law in force, oldest first, each with who passed it (the government it was decided u… |
|
|
377
398
|
| GET | `/api/bongos/government/leads` | `any-builder` | — | board.vote.cast — the Lead of each building (task 1004709): the nine buildings in street order, each with its Lead in office (who, their … |
|
|
378
399
|
| GET | `/api/bongos/government/permissions` | `archon` | — | government.manage — the permission catalog + principals, straight from code (the catalog is CODE, not a table); no DB read. |
|
|
@@ -497,7 +518,7 @@ Base path: `/api/bongos`. Ranks (enforced server-side, [ADR 0016](adr/0016-trust
|
|
|
497
518
|
| POST | `/api/bongos/llm-cache/lookup` | `metic+archon` | `cache_key`, `tokens_saved_est` | POST /llm-cache/lookup — hit/miss + atomic hit_count bump. |
|
|
498
519
|
| POST | `/api/bongos/llm-cache/store` | `metic+archon` | `spec`, `result_stdout`, `result_cost_usd` | POST /llm-cache/store — upsert a freshly-produced result. |
|
|
499
520
|
|
|
500
|
-
## `me` (
|
|
521
|
+
## `me` (54)
|
|
501
522
|
|
|
502
523
|
| Method | Path | Rank | Body | Description |
|
|
503
524
|
|---|---|---|---|---|
|
|
@@ -517,6 +538,7 @@ Base path: `/api/bongos`. Ranks (enforced server-side, [ADR 0016](adr/0016-trust
|
|
|
517
538
|
| POST | `/api/bongos/me/filter-views` | `any-builder` | `page`, `name`, `values`, `is_default` | Save the current filters as a view. |
|
|
518
539
|
| PATCH | `/api/bongos/me/filter-views/:id` | `any-builder` | `page`, `name`, `is_default` | Rename a view and/or make it (or stop it being) my default for that page. |
|
|
519
540
|
| DELETE | `/api/bongos/me/filter-views/:id` | `any-builder` | — | own filter config. |
|
|
541
|
+
| POST | `/api/bongos/me/guardian-cosigns` | `any-builder` | `approval_id`, `rule_id`, `run_key` | POST /api/bongos/me/guardian-cosigns — as a guardian, co-sign one payout to the 16-17 builder(s) I am guardian for. |
|
|
520
542
|
| GET | `/api/bongos/me/guild-engagements` | `any-builder` | — | MY inbox of guild engagements (ADR 0365): "G is applying to P" and "P invited G", for guilds I belong to, inside 30 days, naming only pro… |
|
|
521
543
|
| GET | `/api/bongos/me/guild-requests` | `any-builder` | — | MY queue: invites addressed to me, each carrying the card (the guild's current visibility, which an accept must echo back), the join requ… |
|
|
522
544
|
| GET | `/api/bongos/me/guilds` | `any-builder` | — | MY guilds, each with my own two switches. |
|
|
@@ -534,6 +556,9 @@ Base path: `/api/bongos`. Ranks (enforced server-side, [ADR 0016](adr/0016-trust
|
|
|
534
556
|
| POST | `/api/bongos/me/passkeys/register/verify` | `any-builder` | `response`, `nickname` | POST /api/bongos/me/passkeys/register/verify — finish adding a card. |
|
|
535
557
|
| POST | `/api/bongos/me/passkeys/remove` | `any-builder` | `credential_id` | POST /api/bongos/me/passkeys/remove — Body: { credential_id }. |
|
|
536
558
|
| POST | `/api/bongos/me/passkeys/rename` | `any-builder` | `credential_id`, `nickname` | POST /api/bongos/me/passkeys/rename — Body: { credential_id, nickname }. |
|
|
559
|
+
| POST | `/api/bongos/me/payout-age` | `any-builder` | `tier` | POST /api/bongos/me/payout-age — declare my own age tier. |
|
|
560
|
+
| POST | `/api/bongos/me/payout-freezes/:id/appeal` | `any-builder` | `statement` | POST /api/bongos/me/payout-freezes/:id/appeal — appeal a hold on my pay. |
|
|
561
|
+
| GET | `/api/bongos/me/payouts` | `any-builder` | — | GET /api/bongos/me/payouts — my payout standing: whether I can be paid, every hold on my pay with its notice and what happened since, and… |
|
|
537
562
|
| PATCH | `/api/bongos/me/profile` | `any-builder` | `display_name`, `bio`, `links` | the caller's OWN profile fields (P02, task 1002798; spec Decision 4): bio, typed links, account display name. |
|
|
538
563
|
| GET | `/api/bongos/me/profile-nudge` | `any-builder` | — | The "Complete your profile" nudge dismissal (task 1002802 / P06). |
|
|
539
564
|
| PATCH | `/api/bongos/me/profile-nudge` | `any-builder` | _undocumented_ | PATCH the dismissal. |
|
|
@@ -543,6 +568,7 @@ Base path: `/api/bongos`. Ranks (enforced server-side, [ADR 0016](adr/0016-trust
|
|
|
543
568
|
| GET | `/api/bongos/me/sessions` | `any-builder` | — | GET /api/bongos/me/sessions — every live session on the CALLER's account. |
|
|
544
569
|
| POST | `/api/bongos/me/sessions/revoke` | `any-builder` | `session_id` | POST /api/bongos/me/sessions/revoke — kill ONE of the caller's own sessions. |
|
|
545
570
|
| POST | `/api/bongos/me/sessions/revoke-all` | `any-builder` | validated | POST /api/bongos/me/sessions/revoke-all — sign out everywhere. |
|
|
571
|
+
| GET | `/api/bongos/me/sign-in-methods` | `any-builder` | — | the ways the caller's OWN account signs in (task 1004992, ADR 0393): GitHub, Google, or both, with the address each provider vouched for. |
|
|
546
572
|
| GET | `/api/bongos/me/skill-prefs` | `any-builder` | — | Per-builder skill model preferences (V3.R85 / task 304, migration 037). |
|
|
547
573
|
| PATCH | `/api/bongos/me/skill-prefs` | `any-builder` | _undocumented_ | PATCH a partial set of skill overrides. |
|
|
548
574
|
| GET | `/api/bongos/me/sound-prefs` | `any-builder` | — | Per-builder per-sound on/off preferences (V3.R91 / task 786, migration 075). |
|
|
@@ -603,6 +629,15 @@ Base path: `/api/bongos`. Ranks (enforced server-side, [ADR 0016](adr/0016-trust
|
|
|
603
629
|
| POST | `/api/bongos/my-projects/invites/:clientId/decline` | `any-builder` | — | decline an invite (delete the pending row) for the caller's OWN account. |
|
|
604
630
|
| POST | `/api/bongos/my-projects/join` | `any-builder` | `origin`, `note`, `guild` | request to join a project. |
|
|
605
631
|
|
|
632
|
+
## `notes` (4)
|
|
633
|
+
|
|
634
|
+
| Method | Path | Rank | Body | Description |
|
|
635
|
+
|---|---|---|---|---|
|
|
636
|
+
| GET | `/api/bongos/notes` | `any-builder` | — | notes are shared working information, readable by anyone signed in; a private goal's notes are narrowed to its members by notes.canSee. |
|
|
637
|
+
| POST | `/api/bongos/notes` | `any-builder` | `body`, `kind`, `task_id`, `goal_id` | adding information is not a privileged act; the author is the caller and is never taken from the body. |
|
|
638
|
+
| PATCH | `/api/bongos/notes/:id` | `any-builder` | `kind` | , narrowed in the handler — the author re-files their own note; a Metic or Archon may re-file anyone's (the grouping is a shared view). |
|
|
639
|
+
| DELETE | `/api/bongos/notes/:id` | `any-builder` | — | , narrowed in the handler exactly as the re-file above. |
|
|
640
|
+
|
|
606
641
|
## `npm-release` (8)
|
|
607
642
|
|
|
608
643
|
| Method | Path | Rank | Body | Description |
|
|
@@ -638,6 +673,27 @@ Base path: `/api/bongos`. Ranks (enforced server-side, [ADR 0016](adr/0016-trust
|
|
|
638
673
|
| GET | `/api/bongos/page-notes/images/:id` | `any-builder` | — | |
|
|
639
674
|
| GET | `/api/bongos/page-notes/site` | `any-builder` | — | The public site's reviews (task 1004499), for the Studio's list. |
|
|
640
675
|
|
|
676
|
+
## `payouts` (16)
|
|
677
|
+
|
|
678
|
+
| Method | Path | Rank | Body | Description |
|
|
679
|
+
|---|---|---|---|---|
|
|
680
|
+
| POST | `/api/bongos/payouts/age-records` | `archon` | `builder_id`, `tier` | POST /api/bongos/payouts/age-records — record a builder's age tier, verified by a person. |
|
|
681
|
+
| GET | `/api/bongos/payouts/approvals` | `archon` | — | GET /api/bongos/payouts/approvals — the log, newest first. |
|
|
682
|
+
| POST | `/api/bongos/payouts/approve` | `archon` | `recipient_id`, `amount_cents`, `currency`, `note` | POST /api/bongos/payouts/approve — approve ONE payout. |
|
|
683
|
+
| POST | `/api/bongos/payouts/contracts` | `archon` | — | POST /api/bongos/payouts/contracts — sign ONE contract. |
|
|
684
|
+
| POST | `/api/bongos/payouts/freezes` | `archon` | `builder_id`, `notice_text`, `owed_cents` | POST /api/bongos/payouts/freezes — a person freezes a builder's payouts by hand. |
|
|
685
|
+
| POST | `/api/bongos/payouts/freezes/:id/decide` | `archon` | `decision`, `statement` | POST /api/bongos/payouts/freezes/:id/decide — uphold or lift a freeze, with the reason the person will read. |
|
|
686
|
+
| GET | `/api/bongos/payouts/gates/:builderId` | `archon` | — | GET /api/bongos/payouts/gates/:builderId — may this builder be paid now, and why not. |
|
|
687
|
+
| POST | `/api/bongos/payouts/grants` | `archon` | — | POST /api/bongos/payouts/grants — sign ONE equity grant. |
|
|
688
|
+
| POST | `/api/bongos/payouts/guardians` | `archon` | `builder_id`, `guardian_id`, `guardian_account`, `active` | POST /api/bongos/payouts/guardians — link (or unlink) a 16-17 builder's guardian and the account the guardian controls. |
|
|
689
|
+
| GET | `/api/bongos/payouts/rules` | `archon` | — | GET /api/bongos/payouts/rules — every standing rule with its current terms. |
|
|
690
|
+
| POST | `/api/bongos/payouts/rules` | `archon` | `terms`, `note` | POST /api/bongos/payouts/rules — sign a standing payout rule. |
|
|
691
|
+
| POST | `/api/bongos/payouts/rules/:id/narrow` | `archon` | `terms`, `note` | POST /api/bongos/payouts/rules/:id/narrow — tighten a rule. |
|
|
692
|
+
| POST | `/api/bongos/payouts/rules/:id/revoke` | `archon` | `note` | POST /api/bongos/payouts/rules/:id/revoke — end a rule. |
|
|
693
|
+
| POST | `/api/bongos/payouts/rules/:id/runs` | `archon` | `run_key`, `payouts`, `note` | POST /api/bongos/payouts/rules/:id/runs — notice a run under a rule, opening its pause window. |
|
|
694
|
+
| POST | `/api/bongos/payouts/rules/:id/runs/:runKey/hold` | `archon` | `note` | POST /api/bongos/payouts/rules/:id/runs/:runKey/hold — a person stops a run in its pause window. |
|
|
695
|
+
| POST | `/api/bongos/payouts/screenings` | `archon` | `builder_id`, `result`, `reference`, `valid_days` | POST /api/bongos/payouts/screenings — record a sanctions screening a person ran. |
|
|
696
|
+
|
|
641
697
|
## `profiles` (1)
|
|
642
698
|
|
|
643
699
|
| Method | Path | Rank | Body | Description |
|
|
@@ -921,9 +977,9 @@ Base path: `/api/bongos`. Ranks (enforced server-side, [ADR 0016](adr/0016-trust
|
|
|
921
977
|
| Method | Path | Rank | Body | Description |
|
|
922
978
|
|---|---|---|---|---|
|
|
923
979
|
| GET | `/api/bongos/tasks` | `any-builder` | — | |
|
|
924
|
-
| POST | `/api/bongos/tasks` | `metic+archon` | `version_id`, `title`, `description`, `status`, `touches`, `est_minutes`, `est_cost_usd`, `manual_degree`, `priority`, `automation_tag`, `credits_reward`, `source`, `source_ref`, `value_summary`, `kind`, `discipline`, `parallel_safe`, `newcomer_friendly`, `security_sensitive`, `requires_rank`, `auto_detect_touches`, `criterion_ids`, `module_key`, `goal_id` | Task create/promote/edit (plan/scope mutation) is Metic+ as of ADR 0090 (owner decision 2026-06-26): a Metic who can run idea-triage may … |
|
|
980
|
+
| POST | `/api/bongos/tasks` | `metic+archon` | `version_id`, `title`, `description`, `status`, `touches`, `est_minutes`, `est_cost_usd`, `manual_degree`, `priority`, `automation_tag`, `credits_reward`, `source`, `source_ref`, `value_summary`, `kind`, `discipline`, `parallel_safe`, `newcomer_friendly`, `security_sensitive`, `requires_rank`, `needs`, `auto_detect_touches`, `criterion_ids`, `module_key`, `goal_id` | Task create/promote/edit (plan/scope mutation) is Metic+ as of ADR 0090 (owner decision 2026-06-26): a Metic who can run idea-triage may … |
|
|
925
981
|
| GET | `/api/bongos/tasks/:id` | `any-builder` | — | single-task read; preserved per CRITICAL §4 (supervisor hot path). |
|
|
926
|
-
| PATCH | `/api/bongos/tasks/:id` | `metic+archon` | `kind`, `discipline`, `requires_rank`, `module_key`, `goal_id`, `parent_task_id`, `parallel_safe`, `newcomer_friendly`, `xenos_claimable`, `security_sensitive`, `automation_tag`, `needs_migration`, `description`, `title`, `priority`, `value_summary`, `status` | PATCH /tasks/:id — supports body.parent_task_id (V2 C2), body.kind (V2 B1), body.discipline (mig 014), body.parallel_safe (mig 028), and … |
|
|
982
|
+
| PATCH | `/api/bongos/tasks/:id` | `metic+archon` | `kind`, `discipline`, `requires_rank`, `module_key`, `goal_id`, `parent_task_id`, `parallel_safe`, `newcomer_friendly`, `xenos_claimable`, `security_sensitive`, `automation_tag`, `needs`, `needs_migration`, `description`, `title`, `priority`, `value_summary`, `status` | PATCH /tasks/:id — supports body.parent_task_id (V2 C2), body.kind (V2 B1), body.discipline (mig 014), body.parallel_safe (mig 028), and … |
|
|
927
983
|
| POST | `/api/bongos/tasks/:id/abandon` | `any-builder` | — | POST /tasks/:id/abandon — terminal "retire this task" transition (task 987). |
|
|
928
984
|
| POST | `/api/bongos/tasks/:id/attest-gate` | `any-builder` | `head_sha` | POST /tasks/:id/attest-gate — body: { head_sha }. |
|
|
929
985
|
| POST | `/api/bongos/tasks/:id/confirm` | `any-builder` | `verified` | |
|
package/docs/architecture.md
CHANGED
|
@@ -103,11 +103,16 @@ builders(id, github_id UNIQUE, github_login, display_name, avatar_url, total_cre
|
|
|
103
103
|
+ skill_model_prefs jsonb (mig 037), preferred_disciplines text[] (mig 027), timezone (PMS-V2),
|
|
104
104
|
main_discipline text NULL (core_268 — the builder chosen MAIN role; NULL = not chosen, inferred from credits),
|
|
105
105
|
deactivated_at/reactivated_at/deactivated_reason (mig 025 — the /builder-exit flow; #307 guard)
|
|
106
|
+
+ capability_grants text[] NOT NULL DEFAULT '{}' (core_285, task 1004950) -- what the OWNER has granted by hand: ⊆ {server};
|
|
107
|
+
'owner' is the seat itself and never stored. PATCH /builders/:id/capabilities (owner seat only).
|
|
106
108
|
tasks ... + xenos_claimable boolean NOT NULL DEFAULT false (mig 029) -- Xenos may claim only these
|
|
107
109
|
versions(id PK 'V1'|'PMS-V1'..., name, track, status, scope_doc_path, ...) -- track is free text (the product|internal CHECK was dropped in mig 112, task 1191); the valid set is instance config (config/branding.json "tracks"), not a DB constraint
|
|
108
110
|
tasks(id, version_id, title, description, status, touches text[], est_minutes, est_cost_usd,
|
|
109
111
|
manual_degree, priority, automation_tag, credits_reward, source, source_ref,
|
|
110
112
|
promoted_at, shipped_at, shipped_by, value_summary, created_at, updated_at)
|
|
113
|
+
+ needs text[] NOT NULL DEFAULT '{}' (mig core_285, task 1004950 / ADR 0395) -- what the task needs beyond the build
|
|
114
|
+
loop: ⊆ {owner, server}. The recommend lists show it only to a viewer holding those capabilities;
|
|
115
|
+
a claim refuses only 'server' without the grant. Visibility elsewhere is unchanged.
|
|
111
116
|
+ parked_at, parked_by (mig core_274, task 1004592) -- a PERSON put this task in backlog (restore
|
|
112
117
|
or /demote); the promotion sweep and the three promotion triggers skip it, and a trigger clears
|
|
113
118
|
both whenever status leaves 'backlog'
|
|
@@ -262,6 +267,37 @@ passkey_challenges(challenge PK, purpose, builder_id NULL, created_at, expires_a
|
|
|
262
267
|
-- single-use (DELETEd on consume), TTL swept; builder_id NULL for sign-in
|
|
263
268
|
```
|
|
264
269
|
|
|
270
|
+
Payout approvals (migration `core_283`, task 1004913, [ADR 0385](adr/0385-money-lives-with-a-processor-credits-stay-a-project-meter.md) D4 — the approval step every money-moving task must cite; holds no money; `src/bongos/payout-approvals.js`, routes `/payouts/*` gated `payout.approve` plus the person's own web session):
|
|
271
|
+
|
|
272
|
+
```
|
|
273
|
+
payout_approvals(id, kind rule_signed|rule_narrowed|rule_revoked|run_noticed|run_held|
|
|
274
|
+
payout_approved|grant_signed|contract_signed, rule_id FK self, run_key,
|
|
275
|
+
actor_id FK, actor_rank, session_id, session_source, recipient_id FK,
|
|
276
|
+
amount_cents, currency, terms jsonb, note, created_at)
|
|
277
|
+
-- APPEND-ONLY by trigger (UPDATE/DELETE/TRUNCATE refused). Every kind but
|
|
278
|
+
-- run_noticed needs session_source='web' and a human actor; a narrowing
|
|
279
|
+
-- that widens, and anything after a revocation, are refused by trigger.
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
Payout gates (migration `core_284`, task 1004914, [ADR 0385](adr/0385-money-lives-with-a-processor-credits-stay-a-project-meter.md) D8 — who may be paid at all; `src/bongos/payout-gates.js` runs on every `/payouts/*` money route and inside `checkRun`/`checkApproval`; a refused owed payout files a hold the person sees on `GET /me/payouts` and in the `/me` needs list, and appeals at `POST /me/payout-freezes/:id/appeal`):
|
|
283
|
+
|
|
284
|
+
```
|
|
285
|
+
payout_age_records(id, builder_id, tier under_13|13_15|16_17|adult, basis, recorded_by, recorded_at)
|
|
286
|
+
payout_guardians(id, builder_id, guardian_id, guardian_account, active, recorded_by, recorded_at)
|
|
287
|
+
payout_screenings(id, builder_id, result clear|match|error, screened_by processor:*|person:*,
|
|
288
|
+
reference, valid_until, recorded_by, screened_at)
|
|
289
|
+
-- a processor:* row counts only once PROCESSOR_SCREENING_CONFIRMED names
|
|
290
|
+
-- what the chosen processor screens (task 1004906 decides the processor)
|
|
291
|
+
payout_freezes(id, builder_id, reason, notice_text NOT NULL, appeal_route NOT NULL,
|
|
292
|
+
owed_cents, frozen_by, frozen_at)
|
|
293
|
+
payout_freeze_events(id, freeze_id, kind appealed|upheld|lifted, actor_id, statement, created_at)
|
|
294
|
+
payout_guardian_cosigns(id, builder_id, guardian_id, approval_id | rule_id+run_key,
|
|
295
|
+
session_id, session_source='web', created_at)
|
|
296
|
+
-- ALL APPEND-ONLY by trigger; latest row wins. Triggers also refuse an appeal
|
|
297
|
+
-- by anyone but the frozen person, a decision by them, anything after a lift,
|
|
298
|
+
-- and a co-signature by anyone but the current guardian.
|
|
299
|
+
```
|
|
300
|
+
|
|
265
301
|
Store sub-categories (migration `core_280`, task 1004355, [ADR 0342](adr/0342-module-categories-are-eight-parents-with-approved-sub-categories.md) D3 — an author proposes one at publish, a Metic+ person approves, renames or merges it; `src/bongos/module-subcategories.js`):
|
|
266
302
|
|
|
267
303
|
```
|
|
@@ -326,7 +362,7 @@ Bongos views: `claimable_tasks` (rebuilt in 006 to use SELECT t.*; rebuilt again
|
|
|
326
362
|
- **Canonical path is `/api/bongos` (task 1919); `/api/gds` is a PERMANENT alias.** The router + the discovery index are dual-mounted at both by `serve-internal.js`, driven by the single `src/bongos/api-prefix.js` constant (`API_PREFIX` + `LEGACY_API_PREFIXES`). The legacy `/api/gds` alias never goes away — shipped older CLI binaries, the cached status mirror, and older instances call it. **Exception:** the GitHub OAuth callback stays pinned to `/api/gds/auth/web/callback` (registered on the OAuth app; `src/bongos/routes/auth.js`). Not yet flipped (still ride the permanent alias): `src/**` internal callers + the deeper internal names (folders, `GDS_*` env, `gds_session` cookie) — the deferred internal-rename pass.
|
|
327
363
|
- **Self-describing (task 1918, [ADR 0109](adr/0109-self-describing-openapi-and-hosted-docs.md)).** The whole surface is documented in the standard **OpenAPI 3.1** format at `docs/api/openapi.json`, **generated from the live route files** by `scripts/bongos/gen-api-docs.js` (reusing the same `route-rank-check.js` introspection the ship-time rank gate uses — so it can't drift). Since task 1004866 the spec, the reference and the typed client are **gitignored**: `package-core.js` generates them into every core tarball (and refuses to build if that fails), `serve-internal.js` generates `/docs/openapi.json` and `/lib/bongos-client.js` in-process when the files are absent, and fitness proves generation succeeds. A rendered docs site (vendored Redoc) is served at **`/docs`** on the apex of every instance (`cloudbongos.com/docs` canonical); `GET /api/bongos` returns a machine-discovery index pointing at it. The generated `docs/api-reference.md` supersedes the old hand-maintained `routes-permissions.md`. The mount prefix is the single `src/bongos/api-prefix.js` constant.
|
|
328
364
|
|
|
329
|
-
- Auth: `POST /auth/device/start`, `/poll` (CLI Device Flow); `GET /auth/web/start`, `/web/callback` (browser); `POST /auth/logout`.
|
|
365
|
+
- Auth: `POST /auth/device/start`, `/poll` (CLI Device Flow); `GET /auth/web/start`, `/web/callback` (browser); `POST /auth/logout`. Where Google sign-in is configured (the hub only, ADR 0396): `GET /auth/web/start` shows a GitHub/Google chooser, `GET /auth/google/start` + `/google/callback` sign in with Google, and the CLI device flow is approved in the browser at `GET /auth/device` + `POST /auth/device/approve`.
|
|
330
366
|
- Own-scoped session self-service ([ADR 0206](adr/0206-own-scoped-session-revocation-no-absolute-ceiling.md), task 1003341), in [`src/bongos/routes/my-sessions.js`](../src/bongos/routes/my-sessions.js): `GET /me/sessions` (every live session on the caller's own account — source, user agent, created/last-used/expires, a `current` flag; the token value is never selected), `POST /me/sessions/revoke` (`{session_id}` — one of your own; a miss answers `revoked: 0` so a stranger's id cannot be probed) and `POST /me/sessions/revoke-all` (sign out everywhere, the requesting session included). All three gate on `requireBuilder` alone and key every statement on `req.builder.id` — an account is never named in the query, body or path. They exist because a bearer refreshes to `now()+24h` on every call, so a leaked one never expires, and the cross-builder pair (`POST /auth/revoke`, `/auth/revoke-all`, both still gated on the admin `auth.session.revoke` atom) needed an Archon the victim might not have. Surfaced in the hall at Settings → Active sessions.
|
|
331
367
|
- Authenticated CLI/web: `GET /me` (returns `rank`), `GET /versions[/progress]`, `GET /tasks[?version=&status=&kind=&discipline=]`, `GET /tasks/claimable[?version=&discipline=]`, `GET /tasks/:id`, `POST /tasks` (accepts `discipline` + `criterion_ids`; **metic+** — [ADR 0090](adr/0090-metic-task-authoring.md)), `PATCH /tasks/:id` (supports `parent_task_id`, `kind`, `discipline`, `goal_id` — (re)assign the task's goal; must be a goal in the task's own version, task 1763; **metic+**), `POST /tasks/:id/promote` (**metic+**), `POST /claims`, `POST /claims/:id/resolve`, `POST /cost`.
|
|
332
368
|
- Criterion rollup + task↔criterion links ([ADR 0025](adr/0025-structured-criterion-task-link.md), [#435](https://example.com/builders#/task/435)/[#438](https://example.com/builders#/task/438)): `GET /versions/:id/progress` rolls up each done-when criterion → its gating tasks (via `task_criteria`) → live status counts + the not-yet-shipped `remaining[]` + `unattributed_tasks` (the read behind the `/status` skill, in `src/bongos/done-when.js criterionProgress`). The link CRUD mirrors the dependency endpoints: `GET /tasks/:id/criteria`, `POST /tasks/:id/criteria` (**metic+** — [ADR 0090](adr/0090-metic-task-authoring.md)) and `DELETE /tasks/:id/criteria/:criterionId` (**metic+**). A criterion ref is a numeric `done_when_criteria.id`, a positional `"Cn"` token, or a `criterion_id` slug, resolved against the task's version (`POST /tasks` links at create time so `/status` counts the task with no backfill).
|
|
@@ -231,7 +231,7 @@ or missing ranks fail closed.
|
|
|
231
231
|
`POST /security/reports/:id/{confirm,dispute,fix,link-fix}`, `/security/docs` CRUD);
|
|
232
232
|
`GET /api/bongos/audit-log`; the **roster reads** (`GET /builders/roster`, `/grades/by-builder`,
|
|
233
233
|
`/builders/:id/active-claims`); **cross-builder memory reads** (`GET /memory/builders/:id/file[s]`);
|
|
234
|
-
**project curation + scouting**; `PATCH /builders/:id/budget`; `POST /inbox/:id/ratify`;
|
|
234
|
+
**project curation + scouting**; `PATCH /builders/:id/budget`; `PATCH /builders/:id/capabilities` (server access; additionally the owner seat only, task 1004950); `POST /inbox/:id/ratify`;
|
|
235
235
|
`GET /override-requests` + `POST .../:id/decide`; `POST /claims/:id/release-on-behalf`;
|
|
236
236
|
`POST /done-when/:id/unsatisfy`; `POST /goals/reorder`; `POST /versions`;
|
|
237
237
|
`POST /tasks/newcomer-restock`; `POST /tasks/peer-votes/tally`; `GET /discord/channels/plan` +
|