@bongos/core 1.20.80 → 1.20.81
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 +53 -33
- package/clients/bongos-client/README.md +1 -1
- package/clients/bongos-client/bongos-client.global.js +6 -0
- package/clients/bongos-client/index.cjs +6 -0
- package/clients/bongos-client/index.d.ts +10 -0
- package/clients/bongos-client/index.mjs +6 -0
- package/docs/api/openapi.json +200 -4
- package/docs/api-reference.md +5 -2
- package/docs/copy-inventory.md +59 -53
- package/docs/copy-registry.json +120 -66
- package/docs/module-api-changelog.md +2 -0
- package/docs/page-inventory.json +2 -1
- package/docs/page-readings.json +86 -81
- package/modules/autonomy/cadence.js +3 -0
- package/modules/autonomy/db.js +136 -0
- package/modules/autonomy/fence.js +88 -3
- package/modules/autonomy/migrations/autonomy_005_builder_scope.sql +55 -0
- package/modules/autonomy/routes/autonomy.js +123 -3
- package/modules/government/catalog.js +9 -1
- package/modules/government/migrations/government_022_autonomy_run.sql +38 -0
- package/modules/hall-ui/public/gate.html +5 -2
- package/modules/hall-ui/public/gate.js +73 -4
- package/modules/hall-ui/public/settings-autobongos.js +156 -0
- package/modules/hall-ui/public/settings.html +19 -0
- package/modules/hall-ui/public/settings.js +1 -0
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/release-notes.json +6 -0
- package/src/module-api.js +1 -1
- package/tests/autonomy_builder_scope.mjs +474 -0
- package/tests/autonomy_fence_priority.mjs +3 -1
package/docs/api/openapi.json
CHANGED
|
@@ -1728,6 +1728,65 @@
|
|
|
1728
1728
|
"security": []
|
|
1729
1729
|
}
|
|
1730
1730
|
},
|
|
1731
|
+
"/autonomy/builders/{builderId}/pause": {
|
|
1732
|
+
"post": {
|
|
1733
|
+
"operationId": "post_autonomy_builders_builderId_pause",
|
|
1734
|
+
"tags": [
|
|
1735
|
+
"autonomy"
|
|
1736
|
+
],
|
|
1737
|
+
"summary": "POST /autonomy/builders/:builderId/pause",
|
|
1738
|
+
"description": "The owner pauses or resumes ONE builder's runner without throwing the master switch. Same atom as the kill switch: stopping a machine is the same act whether it is everyone's or one person's, and the paused builder must not be able to lift it (autonomy.run does not reach this route).\n\n**Rank:** `archon` — Archon only (rank and identity management + the escalation keys — the trust boundary).\n\n**Permissions:** `autonomy.fence.manage` (all required).",
|
|
1739
|
+
"x-rank": "archon",
|
|
1740
|
+
"x-source": "modules/autonomy/routes/autonomy.js",
|
|
1741
|
+
"x-permissions": [
|
|
1742
|
+
"autonomy.fence.manage"
|
|
1743
|
+
],
|
|
1744
|
+
"parameters": [
|
|
1745
|
+
{
|
|
1746
|
+
"name": "builderId",
|
|
1747
|
+
"in": "path",
|
|
1748
|
+
"required": true,
|
|
1749
|
+
"schema": {
|
|
1750
|
+
"type": "string"
|
|
1751
|
+
},
|
|
1752
|
+
"description": "Path parameter `builderId`."
|
|
1753
|
+
}
|
|
1754
|
+
],
|
|
1755
|
+
"requestBody": {
|
|
1756
|
+
"required": true,
|
|
1757
|
+
"content": {
|
|
1758
|
+
"application/json": {
|
|
1759
|
+
"schema": {
|
|
1760
|
+
"$ref": "#/components/schemas/PostAutonomyBuildersBuilderIdPauseRequest"
|
|
1761
|
+
}
|
|
1762
|
+
}
|
|
1763
|
+
},
|
|
1764
|
+
"x-validated": true
|
|
1765
|
+
},
|
|
1766
|
+
"responses": {
|
|
1767
|
+
"200": {
|
|
1768
|
+
"description": "Success."
|
|
1769
|
+
},
|
|
1770
|
+
"400": {
|
|
1771
|
+
"$ref": "#/components/responses/ValidationFailed"
|
|
1772
|
+
},
|
|
1773
|
+
"401": {
|
|
1774
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
1775
|
+
},
|
|
1776
|
+
"403": {
|
|
1777
|
+
"$ref": "#/components/responses/Forbidden"
|
|
1778
|
+
},
|
|
1779
|
+
"404": {
|
|
1780
|
+
"$ref": "#/components/responses/NotFound"
|
|
1781
|
+
}
|
|
1782
|
+
},
|
|
1783
|
+
"security": [
|
|
1784
|
+
{
|
|
1785
|
+
"builderSession": []
|
|
1786
|
+
}
|
|
1787
|
+
]
|
|
1788
|
+
}
|
|
1789
|
+
},
|
|
1731
1790
|
"/autonomy/fence": {
|
|
1732
1791
|
"get": {
|
|
1733
1792
|
"operationId": "get_autonomy_fence",
|
|
@@ -1735,7 +1794,7 @@
|
|
|
1735
1794
|
"autonomy"
|
|
1736
1795
|
],
|
|
1737
1796
|
"summary": "GET /autonomy/fence",
|
|
1738
|
-
"description": "The runner's own read, every iteration. ANY-BUILDER on purpose: learning that you must stop should never require an elevated session, because the failure mode of \"could not read the fence\" is a machine that keeps going. The body carries no secret — it is a boolean, a reason string and a list of goal ids.\n\n**Rank:** `any-builder` — Any authenticated builder (row-level ownership enforced in-handler).",
|
|
1797
|
+
"description": "The runner's own read, every iteration. ANY-BUILDER on purpose: learning that you must stop should never require an elevated session, because the failure mode of \"could not read the fence\" is a machine that keeps going. The body carries no secret — it is a boolean, a reason string and a list of goal ids. THE CALLER'S fence, not the project's (task 1004501). The top-level `enabled` and `goals` are what THIS builder's runner may do: the project switch, then `autonomy.run`, then the owner's pause on this builder, and the allowlist narrowed to their own picks (fence.js effectiveFence). Computing it here keeps the runner dumb and means a runner that predates this change is narrowed too. The unnarrowed project fence rides along as `project` for the owner's page.\n\n**Rank:** `any-builder` — Any authenticated builder (row-level ownership enforced in-handler).",
|
|
1739
1798
|
"x-rank": "any-builder",
|
|
1740
1799
|
"x-source": "modules/autonomy/routes/autonomy.js",
|
|
1741
1800
|
"responses": {
|
|
@@ -1996,6 +2055,58 @@
|
|
|
1996
2055
|
]
|
|
1997
2056
|
}
|
|
1998
2057
|
},
|
|
2058
|
+
"/autonomy/me/goals": {
|
|
2059
|
+
"put": {
|
|
2060
|
+
"operationId": "put_autonomy_me_goals",
|
|
2061
|
+
"tags": [
|
|
2062
|
+
"autonomy"
|
|
2063
|
+
],
|
|
2064
|
+
"summary": "PUT /autonomy/me/goals",
|
|
2065
|
+
"description": "A builder picks which allowlisted goals THEIR runner works. Replaces the whole list; `[]` means \"my runner takes no work\". Keyed by the session, never the body, so nobody can set another builder's picks. Behind `autonomy.run`: a builder who may not run a runner has nothing to scope. A goal not on the project allowlist is refused with 409 and nothing is written — the pick can narrow the project fence and never widen it.\n\n**Rank:** `metic+archon` — Metic or Archon rank (review/triage powers).\n\n**Permissions:** `autonomy.run` (all required).",
|
|
2066
|
+
"x-rank": "metic+archon",
|
|
2067
|
+
"x-source": "modules/autonomy/routes/autonomy.js",
|
|
2068
|
+
"x-permissions": [
|
|
2069
|
+
"autonomy.run"
|
|
2070
|
+
],
|
|
2071
|
+
"requestBody": {
|
|
2072
|
+
"required": true,
|
|
2073
|
+
"content": {
|
|
2074
|
+
"application/json": {
|
|
2075
|
+
"schema": {
|
|
2076
|
+
"$ref": "#/components/schemas/PutAutonomyMeGoalsRequest"
|
|
2077
|
+
}
|
|
2078
|
+
}
|
|
2079
|
+
},
|
|
2080
|
+
"x-validated": true
|
|
2081
|
+
},
|
|
2082
|
+
"responses": {
|
|
2083
|
+
"200": {
|
|
2084
|
+
"description": "Success.",
|
|
2085
|
+
"content": {
|
|
2086
|
+
"application/json": {
|
|
2087
|
+
"schema": {
|
|
2088
|
+
"$ref": "#/components/schemas/PutAutonomyMeGoalsResponse"
|
|
2089
|
+
}
|
|
2090
|
+
}
|
|
2091
|
+
}
|
|
2092
|
+
},
|
|
2093
|
+
"400": {
|
|
2094
|
+
"$ref": "#/components/responses/ValidationFailed"
|
|
2095
|
+
},
|
|
2096
|
+
"401": {
|
|
2097
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
2098
|
+
},
|
|
2099
|
+
"403": {
|
|
2100
|
+
"$ref": "#/components/responses/Forbidden"
|
|
2101
|
+
}
|
|
2102
|
+
},
|
|
2103
|
+
"security": [
|
|
2104
|
+
{
|
|
2105
|
+
"builderSession": []
|
|
2106
|
+
}
|
|
2107
|
+
]
|
|
2108
|
+
}
|
|
2109
|
+
},
|
|
1999
2110
|
"/autonomy/precheck": {
|
|
2000
2111
|
"get": {
|
|
2001
2112
|
"operationId": "get_autonomy_precheck",
|
|
@@ -2068,6 +2179,47 @@
|
|
|
2068
2179
|
]
|
|
2069
2180
|
}
|
|
2070
2181
|
},
|
|
2182
|
+
"/autonomy/runners/all": {
|
|
2183
|
+
"get": {
|
|
2184
|
+
"operationId": "get_autonomy_runners_all",
|
|
2185
|
+
"tags": [
|
|
2186
|
+
"autonomy"
|
|
2187
|
+
],
|
|
2188
|
+
"summary": "GET /autonomy/runners/all",
|
|
2189
|
+
"description": "The owner's view of every builder's runners: who, which goals they picked, whether they are paused, and each runner's health — the server's verdict, as GET /autonomy/runners attaches it. Owner-only: a heartbeat names a machine and its hostname, which is each builder's own business (task 1003905), and the owner is the one person who needs every row to run the fence.\n\n**Rank:** `archon` — Archon only (rank and identity management + the escalation keys — the trust boundary).\n\n**Permissions:** `autonomy.fence.manage` (all required).",
|
|
2190
|
+
"x-rank": "archon",
|
|
2191
|
+
"x-source": "modules/autonomy/routes/autonomy.js",
|
|
2192
|
+
"x-permissions": [
|
|
2193
|
+
"autonomy.fence.manage"
|
|
2194
|
+
],
|
|
2195
|
+
"responses": {
|
|
2196
|
+
"200": {
|
|
2197
|
+
"description": "Success.",
|
|
2198
|
+
"content": {
|
|
2199
|
+
"application/json": {
|
|
2200
|
+
"schema": {
|
|
2201
|
+
"$ref": "#/components/schemas/GetAutonomyRunnersAllResponse"
|
|
2202
|
+
}
|
|
2203
|
+
}
|
|
2204
|
+
}
|
|
2205
|
+
},
|
|
2206
|
+
"400": {
|
|
2207
|
+
"$ref": "#/components/responses/BadRequest"
|
|
2208
|
+
},
|
|
2209
|
+
"401": {
|
|
2210
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
2211
|
+
},
|
|
2212
|
+
"403": {
|
|
2213
|
+
"$ref": "#/components/responses/Forbidden"
|
|
2214
|
+
}
|
|
2215
|
+
},
|
|
2216
|
+
"security": [
|
|
2217
|
+
{
|
|
2218
|
+
"builderSession": []
|
|
2219
|
+
}
|
|
2220
|
+
]
|
|
2221
|
+
}
|
|
2222
|
+
},
|
|
2071
2223
|
"/autonomy/runs": {
|
|
2072
2224
|
"get": {
|
|
2073
2225
|
"operationId": "get_autonomy_runs",
|
|
@@ -23362,6 +23514,15 @@
|
|
|
23362
23514
|
"admitted"
|
|
23363
23515
|
]
|
|
23364
23516
|
},
|
|
23517
|
+
"GetAutonomyRunnersAllResponse": {
|
|
23518
|
+
"type": "object",
|
|
23519
|
+
"properties": {
|
|
23520
|
+
"builders": {}
|
|
23521
|
+
},
|
|
23522
|
+
"required": [
|
|
23523
|
+
"builders"
|
|
23524
|
+
]
|
|
23525
|
+
},
|
|
23365
23526
|
"GetAutonomyRunnersResponse": {
|
|
23366
23527
|
"type": "object",
|
|
23367
23528
|
"properties": {
|
|
@@ -26391,6 +26552,22 @@
|
|
|
26391
26552
|
"revoked"
|
|
26392
26553
|
]
|
|
26393
26554
|
},
|
|
26555
|
+
"PostAutonomyBuildersBuilderIdPauseRequest": {
|
|
26556
|
+
"type": "object",
|
|
26557
|
+
"properties": {
|
|
26558
|
+
"paused": {
|
|
26559
|
+
"type": "boolean"
|
|
26560
|
+
},
|
|
26561
|
+
"reason": {
|
|
26562
|
+
"type": "string",
|
|
26563
|
+
"maxLength": 500
|
|
26564
|
+
}
|
|
26565
|
+
},
|
|
26566
|
+
"required": [
|
|
26567
|
+
"paused"
|
|
26568
|
+
],
|
|
26569
|
+
"additionalProperties": false
|
|
26570
|
+
},
|
|
26394
26571
|
"PostAutonomyFenceGoalsRequest": {
|
|
26395
26572
|
"type": "object",
|
|
26396
26573
|
"properties": {
|
|
@@ -31015,6 +31192,25 @@
|
|
|
31015
31192
|
"criteria"
|
|
31016
31193
|
]
|
|
31017
31194
|
},
|
|
31195
|
+
"PutAutonomyMeGoalsRequest": {
|
|
31196
|
+
"type": "object",
|
|
31197
|
+
"properties": {
|
|
31198
|
+
"goal_ids": {}
|
|
31199
|
+
},
|
|
31200
|
+
"required": [
|
|
31201
|
+
"goal_ids"
|
|
31202
|
+
],
|
|
31203
|
+
"additionalProperties": false
|
|
31204
|
+
},
|
|
31205
|
+
"PutAutonomyMeGoalsResponse": {
|
|
31206
|
+
"type": "object",
|
|
31207
|
+
"properties": {
|
|
31208
|
+
"goals": {}
|
|
31209
|
+
},
|
|
31210
|
+
"required": [
|
|
31211
|
+
"goals"
|
|
31212
|
+
]
|
|
31213
|
+
},
|
|
31018
31214
|
"PutCopyDeskPagesPageIdDraftRequest": {
|
|
31019
31215
|
"type": "object",
|
|
31020
31216
|
"properties": {
|
|
@@ -31351,9 +31547,9 @@
|
|
|
31351
31547
|
"description": "A required dependency/feature is not configured or is temporarily down."
|
|
31352
31548
|
}
|
|
31353
31549
|
},
|
|
31354
|
-
"x-endpoint-count":
|
|
31355
|
-
"x-schema-count":
|
|
31550
|
+
"x-endpoint-count": 493,
|
|
31551
|
+
"x-schema-count": 524,
|
|
31356
31552
|
"x-undocumented-bodies": 12,
|
|
31357
|
-
"x-response-schemas":
|
|
31553
|
+
"x-response-schemas": 349,
|
|
31358
31554
|
"x-generated-by": "scripts/gds/gen-api-docs.js"
|
|
31359
31555
|
}
|
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. 493 endpoints across 91 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`.
|
|
@@ -81,18 +81,21 @@ Base path: `/api/bongos`. Ranks (enforced server-side, [ADR 0016](adr/0016-trust
|
|
|
81
81
|
| GET | `/api/bongos/auth/web/handoff` | `public` | — | GET /auth/web/handoff?code=&return= — the far side of the one-time session handoff (task 1004357). |
|
|
82
82
|
| GET | `/api/bongos/auth/web/start` | `public` | — | /auth/web — browser flow (used by the /builders page). |
|
|
83
83
|
|
|
84
|
-
## `autonomy` (
|
|
84
|
+
## `autonomy` (12)
|
|
85
85
|
|
|
86
86
|
| Method | Path | Rank | Body | Description |
|
|
87
87
|
|---|---|---|---|---|
|
|
88
|
+
| POST | `/api/bongos/autonomy/builders/:builderId/pause` | `archon` | `paused`, `reason` | The owner pauses or resumes ONE builder's runner without throwing the master switch. |
|
|
88
89
|
| GET | `/api/bongos/autonomy/fence` | `any-builder` | — | The runner's own read, every iteration. |
|
|
89
90
|
| POST | `/api/bongos/autonomy/fence` | `archon` | `enabled`, `reason` | The kill switch. |
|
|
90
91
|
| POST | `/api/bongos/autonomy/fence/goals` | `archon` | `goal_id`, `note` | Add a goal to the allowlist. |
|
|
91
92
|
| DELETE | `/api/bongos/autonomy/fence/goals/:goalId` | `archon` | — | Revoke one. |
|
|
92
93
|
| POST | `/api/bongos/autonomy/fence/priority` | `archon` | `goal_id` | The priority goal (task 1004453): which allowlisted goal the runner works first. |
|
|
93
94
|
| POST | `/api/bongos/autonomy/heartbeat` | `any-builder` | `host`, `pid`, `started_at`, `mode`, `consecutive_failures`, `last_event`, `working_task_id`, `working_goal_id`, `head`, `disk_head`, `main_head`, `claude_account` | The runner's check-in, once per loop. |
|
|
95
|
+
| PUT | `/api/bongos/autonomy/me/goals` | `metic+archon` | `goal_ids` | A builder picks which allowlisted goals THEIR runner works. |
|
|
94
96
|
| GET | `/api/bongos/autonomy/precheck` | `metic+archon` | — | |
|
|
95
97
|
| GET | `/api/bongos/autonomy/runners` | `any-builder` | — | What the hall renders: the CALLER'S OWN runners, with the pure verdict attached so the page and any future alert cannot disagree about wh… |
|
|
98
|
+
| GET | `/api/bongos/autonomy/runners/all` | `archon` | — | The owner's view of every builder's runners: who, which goals they picked, whether they are paused, and each runner's health — the server… |
|
|
96
99
|
| GET | `/api/bongos/autonomy/runs` | `metic+archon` | — | The gate's past decisions — did a routine fire, and what did it decide, and why (task 1002669). |
|
|
97
100
|
|
|
98
101
|
## `backup` (2)
|