@bongos/core 1.24.77 → 1.24.78
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 +89 -44
- package/clients/bongos-client/README.md +1 -1
- package/clients/bongos-client/bongos-client.global.js +8 -0
- package/clients/bongos-client/index.cjs +8 -0
- package/clients/bongos-client/index.d.ts +12 -1
- package/clients/bongos-client/index.mjs +8 -0
- package/docs/adr/0307-autobongos-a-deterministic-supervisor-and-agentic-workers.md +15 -0
- package/docs/api/openapi.json +209 -4
- package/docs/api-reference.md +7 -3
- package/docs/copy-inventory.md +109 -92
- package/docs/copy-registry.json +291 -108
- package/docs/module-api-changelog.md +2 -0
- package/docs/page-inventory.json +2 -0
- package/docs/page-readings.json +111 -97
- package/docs/recipes/autobongos-runner-setup.md +148 -0
- package/docs/recipes/autobongos-windows-host.md +10 -7
- package/modules/autonomy/cadence.js +3 -0
- package/modules/autonomy/db.js +86 -7
- package/modules/autonomy/fence.js +20 -5
- package/modules/autonomy/migrations/autonomy_006_runner_device.sql +45 -0
- package/modules/autonomy/module.json +2 -1
- package/modules/autonomy/routes/autonomy.js +165 -3
- package/modules/autonomy/runner-health.js +27 -0
- package/modules/autonomy/skills/autobongos-setup/SKILL.md +86 -0
- package/modules/hall-ui/public/commands-lib.js +1 -1
- package/modules/hall-ui/public/gate.js +12 -5
- package/modules/hall-ui/public/runner-button.css +55 -0
- package/modules/hall-ui/public/runner-button.js +187 -0
- package/modules/hall-ui/public/settings-autobongos.js +349 -63
- package/modules/hall-ui/public/settings.html +23 -10
- package/modules/hall-ui/records/runner-button.md +16 -0
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/release-notes.json +14 -0
- package/scripts/bongos/autobongos-host.js +16 -2
- package/scripts/bongos/autobongos-run.js +18 -3
- package/scripts/bongos/stranded-rows.js +39 -2
- package/scripts/hall-preview/server.js +7 -0
- package/src/module-api.js +1 -1
- package/tests/autobongos_host.mjs +28 -0
- package/tests/autonomy_config_idle.mjs +9 -4
- package/tests/autonomy_runner_device.mjs +444 -0
- package/tests/autonomy_runner_identity.mjs +3 -1
- package/tests/hall_runner_button.mjs +467 -0
- package/tests/hall_runner_panel_connect.mjs +73 -0
- package/tests/stranded_rows.mjs +50 -0
package/docs/api/openapi.json
CHANGED
|
@@ -2622,7 +2622,7 @@
|
|
|
2622
2622
|
"autonomy"
|
|
2623
2623
|
],
|
|
2624
2624
|
"summary": "GET /autonomy/fence",
|
|
2625
|
-
"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).",
|
|
2625
|
+
"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. AND THE CALLER'S DEVICE (task 1005094). A runner names the machine it is on (?host=), and that device's own Run switch is the last layer: stopped there, the answer is enabled:false / stop_code device_stopped, whatever every other layer says. A caller that names no host — a runner that predates this, the Settings page — gets no device layer and is exactly as fenced as before. A host that will not parse is treated as not named, never as an error: the one thing this read must not do is fail a runner into \"unreadable\" over a name. ONE MORE READ, knowingly. holdsPermission above was written so that this route, which every runner asks on every iteration and every waiting poll, adds no query for the permission. The device layer does add one: a single row by primary key (builder, host), or by (builder, session) for a runner login, run beside the other reads rather than after them. It is paid only by a caller that names a device or is a runner login; the Settings page and a runner that predates this pay nothing new. A RUNNER'S OWN LOGIN DOES NOT GET TO CHOOSE. For such a session the device is the one that login checks in from, found by the session id the server holds; the name it sends is not consulted. Otherwise a runner whose builder pressed Stop could read its fence without a name, or under another device's, and be told to carry on. And a runner login with no check-in yet reads as STOPPED: its row will be born stopped anyway, and a login that has not said which device it is must not be answered as if it had none.\n\n**Rank:** `any-builder` — Any authenticated builder (row-level ownership enforced in-handler).",
|
|
2626
2626
|
"x-rank": "any-builder",
|
|
2627
2627
|
"x-source": "modules/autonomy/routes/autonomy.js",
|
|
2628
2628
|
"responses": {
|
|
@@ -2969,6 +2969,48 @@
|
|
|
2969
2969
|
]
|
|
2970
2970
|
}
|
|
2971
2971
|
},
|
|
2972
|
+
"/autonomy/runner-setup.ps1": {
|
|
2973
|
+
"get": {
|
|
2974
|
+
"operationId": "get_autonomy_runner_setup_ps1",
|
|
2975
|
+
"tags": [
|
|
2976
|
+
"autonomy"
|
|
2977
|
+
],
|
|
2978
|
+
"summary": "GET /autonomy/runner-setup.ps1",
|
|
2979
|
+
"description": "the Windows first lines; see the note above.\n\n**Rank:** `public` — No authentication — any caller.",
|
|
2980
|
+
"x-rank": "public",
|
|
2981
|
+
"x-source": "modules/autonomy/routes/autonomy.js",
|
|
2982
|
+
"responses": {
|
|
2983
|
+
"200": {
|
|
2984
|
+
"description": "Success."
|
|
2985
|
+
},
|
|
2986
|
+
"400": {
|
|
2987
|
+
"$ref": "#/components/responses/BadRequest"
|
|
2988
|
+
}
|
|
2989
|
+
},
|
|
2990
|
+
"security": []
|
|
2991
|
+
}
|
|
2992
|
+
},
|
|
2993
|
+
"/autonomy/runner-setup.sh": {
|
|
2994
|
+
"get": {
|
|
2995
|
+
"operationId": "get_autonomy_runner_setup_sh",
|
|
2996
|
+
"tags": [
|
|
2997
|
+
"autonomy"
|
|
2998
|
+
],
|
|
2999
|
+
"summary": "GET /autonomy/runner-setup.sh",
|
|
3000
|
+
"description": "the Mac first lines; see the note above.\n\n**Rank:** `public` — No authentication — any caller.",
|
|
3001
|
+
"x-rank": "public",
|
|
3002
|
+
"x-source": "modules/autonomy/routes/autonomy.js",
|
|
3003
|
+
"responses": {
|
|
3004
|
+
"200": {
|
|
3005
|
+
"description": "Success."
|
|
3006
|
+
},
|
|
3007
|
+
"400": {
|
|
3008
|
+
"$ref": "#/components/responses/BadRequest"
|
|
3009
|
+
}
|
|
3010
|
+
},
|
|
3011
|
+
"security": []
|
|
3012
|
+
}
|
|
3013
|
+
},
|
|
2972
3014
|
"/autonomy/runners": {
|
|
2973
3015
|
"get": {
|
|
2974
3016
|
"operationId": "get_autonomy_runners",
|
|
@@ -3048,6 +3090,124 @@
|
|
|
3048
3090
|
]
|
|
3049
3091
|
}
|
|
3050
3092
|
},
|
|
3093
|
+
"/autonomy/runners/{host}": {
|
|
3094
|
+
"delete": {
|
|
3095
|
+
"operationId": "delete_autonomy_runners_host",
|
|
3096
|
+
"tags": [
|
|
3097
|
+
"autonomy"
|
|
3098
|
+
],
|
|
3099
|
+
"summary": "DELETE /autonomy/runners/:host",
|
|
3100
|
+
"description": "Forget one of the caller's own devices. ANY-BUILDER, deliberately wider than Run: a builder who has since lost `autonomy.run` must still be able to clear their own device off their own page, and the row is keyed by the caller, so the only thing reachable is theirs. It does not revoke the device's login — that is the core's own-session route (POST /me/sessions/revoke), which the Settings page calls first with the `session_id` GET /autonomy/runners gave it. `had_own_login` says whether there was one to revoke.\n\n**Rank:** `any-builder` — Any authenticated builder (row-level ownership enforced in-handler).",
|
|
3101
|
+
"x-rank": "any-builder",
|
|
3102
|
+
"x-source": "modules/autonomy/routes/autonomy.js",
|
|
3103
|
+
"parameters": [
|
|
3104
|
+
{
|
|
3105
|
+
"name": "host",
|
|
3106
|
+
"in": "path",
|
|
3107
|
+
"required": true,
|
|
3108
|
+
"schema": {
|
|
3109
|
+
"type": "string"
|
|
3110
|
+
},
|
|
3111
|
+
"description": "Path parameter `host`."
|
|
3112
|
+
}
|
|
3113
|
+
],
|
|
3114
|
+
"responses": {
|
|
3115
|
+
"200": {
|
|
3116
|
+
"description": "Success.",
|
|
3117
|
+
"content": {
|
|
3118
|
+
"application/json": {
|
|
3119
|
+
"schema": {
|
|
3120
|
+
"$ref": "#/components/schemas/DeleteAutonomyRunnersHostResponse"
|
|
3121
|
+
}
|
|
3122
|
+
}
|
|
3123
|
+
}
|
|
3124
|
+
},
|
|
3125
|
+
"400": {
|
|
3126
|
+
"$ref": "#/components/responses/BadRequest"
|
|
3127
|
+
},
|
|
3128
|
+
"401": {
|
|
3129
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
3130
|
+
},
|
|
3131
|
+
"403": {
|
|
3132
|
+
"$ref": "#/components/responses/Forbidden"
|
|
3133
|
+
},
|
|
3134
|
+
"404": {
|
|
3135
|
+
"$ref": "#/components/responses/NotFound"
|
|
3136
|
+
}
|
|
3137
|
+
},
|
|
3138
|
+
"security": [
|
|
3139
|
+
{
|
|
3140
|
+
"builderSession": []
|
|
3141
|
+
}
|
|
3142
|
+
]
|
|
3143
|
+
}
|
|
3144
|
+
},
|
|
3145
|
+
"/autonomy/runners/{host}/run": {
|
|
3146
|
+
"post": {
|
|
3147
|
+
"operationId": "post_autonomy_runners_host_run",
|
|
3148
|
+
"tags": [
|
|
3149
|
+
"autonomy"
|
|
3150
|
+
],
|
|
3151
|
+
"summary": "POST /autonomy/runners/:host/run",
|
|
3152
|
+
"description": "Run or Stop ONE of the caller's own devices. Behind `autonomy.run`, like the goal picks: a builder who may not run a runner has nothing to start. Stopping is allowed to the same people and no wider — it is their own machine.\n\n**Rank:** `metic+archon` — Metic or Archon rank (review/triage powers).\n\n**Permissions:** `autonomy.run` (all required).",
|
|
3153
|
+
"x-rank": "metic+archon",
|
|
3154
|
+
"x-source": "modules/autonomy/routes/autonomy.js",
|
|
3155
|
+
"x-permissions": [
|
|
3156
|
+
"autonomy.run"
|
|
3157
|
+
],
|
|
3158
|
+
"parameters": [
|
|
3159
|
+
{
|
|
3160
|
+
"name": "host",
|
|
3161
|
+
"in": "path",
|
|
3162
|
+
"required": true,
|
|
3163
|
+
"schema": {
|
|
3164
|
+
"type": "string"
|
|
3165
|
+
},
|
|
3166
|
+
"description": "Path parameter `host`."
|
|
3167
|
+
}
|
|
3168
|
+
],
|
|
3169
|
+
"requestBody": {
|
|
3170
|
+
"required": true,
|
|
3171
|
+
"content": {
|
|
3172
|
+
"application/json": {
|
|
3173
|
+
"schema": {
|
|
3174
|
+
"$ref": "#/components/schemas/PostAutonomyRunnersHostRunRequest"
|
|
3175
|
+
}
|
|
3176
|
+
}
|
|
3177
|
+
},
|
|
3178
|
+
"x-validated": true
|
|
3179
|
+
},
|
|
3180
|
+
"responses": {
|
|
3181
|
+
"200": {
|
|
3182
|
+
"description": "Success.",
|
|
3183
|
+
"content": {
|
|
3184
|
+
"application/json": {
|
|
3185
|
+
"schema": {
|
|
3186
|
+
"$ref": "#/components/schemas/PostAutonomyRunnersHostRunResponse"
|
|
3187
|
+
}
|
|
3188
|
+
}
|
|
3189
|
+
}
|
|
3190
|
+
},
|
|
3191
|
+
"400": {
|
|
3192
|
+
"$ref": "#/components/responses/ValidationFailed"
|
|
3193
|
+
},
|
|
3194
|
+
"401": {
|
|
3195
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
3196
|
+
},
|
|
3197
|
+
"403": {
|
|
3198
|
+
"$ref": "#/components/responses/Forbidden"
|
|
3199
|
+
},
|
|
3200
|
+
"404": {
|
|
3201
|
+
"$ref": "#/components/responses/NotFound"
|
|
3202
|
+
}
|
|
3203
|
+
},
|
|
3204
|
+
"security": [
|
|
3205
|
+
{
|
|
3206
|
+
"builderSession": []
|
|
3207
|
+
}
|
|
3208
|
+
]
|
|
3209
|
+
}
|
|
3210
|
+
},
|
|
3051
3211
|
"/autonomy/runs": {
|
|
3052
3212
|
"get": {
|
|
3053
3213
|
"operationId": "get_autonomy_runs",
|
|
@@ -31946,6 +32106,23 @@
|
|
|
31946
32106
|
"removed"
|
|
31947
32107
|
]
|
|
31948
32108
|
},
|
|
32109
|
+
"DeleteAutonomyRunnersHostResponse": {
|
|
32110
|
+
"type": "object",
|
|
32111
|
+
"properties": {
|
|
32112
|
+
"removed": {
|
|
32113
|
+
"type": "boolean"
|
|
32114
|
+
},
|
|
32115
|
+
"host": {},
|
|
32116
|
+
"had_own_login": {
|
|
32117
|
+
"type": "boolean"
|
|
32118
|
+
}
|
|
32119
|
+
},
|
|
32120
|
+
"required": [
|
|
32121
|
+
"removed",
|
|
32122
|
+
"host",
|
|
32123
|
+
"had_own_login"
|
|
32124
|
+
]
|
|
32125
|
+
},
|
|
31949
32126
|
"DeleteBlockersIdLinkTaskIdResponse": {
|
|
31950
32127
|
"type": "object",
|
|
31951
32128
|
"properties": {
|
|
@@ -36408,6 +36585,9 @@
|
|
|
36408
36585
|
"claude_account": {
|
|
36409
36586
|
"type": "string",
|
|
36410
36587
|
"maxLength": 200
|
|
36588
|
+
},
|
|
36589
|
+
"hold_until": {
|
|
36590
|
+
"type": "number"
|
|
36411
36591
|
}
|
|
36412
36592
|
},
|
|
36413
36593
|
"required": [
|
|
@@ -36428,6 +36608,31 @@
|
|
|
36428
36608
|
"heartbeat"
|
|
36429
36609
|
]
|
|
36430
36610
|
},
|
|
36611
|
+
"PostAutonomyRunnersHostRunRequest": {
|
|
36612
|
+
"type": "object",
|
|
36613
|
+
"properties": {
|
|
36614
|
+
"run": {
|
|
36615
|
+
"type": "boolean"
|
|
36616
|
+
}
|
|
36617
|
+
},
|
|
36618
|
+
"required": [
|
|
36619
|
+
"run"
|
|
36620
|
+
],
|
|
36621
|
+
"additionalProperties": false
|
|
36622
|
+
},
|
|
36623
|
+
"PostAutonomyRunnersHostRunResponse": {
|
|
36624
|
+
"type": "object",
|
|
36625
|
+
"properties": {
|
|
36626
|
+
"host": {},
|
|
36627
|
+
"run_requested": {},
|
|
36628
|
+
"run_changed_at": {}
|
|
36629
|
+
},
|
|
36630
|
+
"required": [
|
|
36631
|
+
"host",
|
|
36632
|
+
"run_requested",
|
|
36633
|
+
"run_changed_at"
|
|
36634
|
+
]
|
|
36635
|
+
},
|
|
36431
36636
|
"PostBackupTriggerResponse": {
|
|
36432
36637
|
"type": "object",
|
|
36433
36638
|
"properties": {
|
|
@@ -43060,9 +43265,9 @@
|
|
|
43060
43265
|
"description": "A required dependency/feature is not configured or is temporarily down."
|
|
43061
43266
|
}
|
|
43062
43267
|
},
|
|
43063
|
-
"x-endpoint-count":
|
|
43064
|
-
"x-schema-count":
|
|
43268
|
+
"x-endpoint-count": 690,
|
|
43269
|
+
"x-schema-count": 726,
|
|
43065
43270
|
"x-undocumented-bodies": 12,
|
|
43066
|
-
"x-response-schemas":
|
|
43271
|
+
"x-response-schemas": 461,
|
|
43067
43272
|
"x-generated-by": "scripts/bongos/gen-api-docs.js"
|
|
43068
43273
|
}
|
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. 690 endpoints across 117 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`.
|
|
@@ -106,7 +106,7 @@ Base path: `/api/bongos`. Ranks (enforced server-side, [ADR 0016](adr/0016-trust
|
|
|
106
106
|
| GET | `/api/bongos/auth/web/handoff` | `public` | — | GET /auth/web/handoff?code=&return= — the far side of the one-time session handoff (task 1004357). |
|
|
107
107
|
| GET | `/api/bongos/auth/web/start` | `public` | — | /auth/web — browser flow (used by the /builders page). |
|
|
108
108
|
|
|
109
|
-
## `autonomy` (
|
|
109
|
+
## `autonomy` (16)
|
|
110
110
|
|
|
111
111
|
| Method | Path | Rank | Body | Description |
|
|
112
112
|
|---|---|---|---|---|
|
|
@@ -116,10 +116,14 @@ Base path: `/api/bongos`. Ranks (enforced server-side, [ADR 0016](adr/0016-trust
|
|
|
116
116
|
| POST | `/api/bongos/autonomy/fence/goals` | `archon` | `goal_id`, `note` | Add a goal to the allowlist. |
|
|
117
117
|
| DELETE | `/api/bongos/autonomy/fence/goals/:goalId` | `archon` | — | Revoke one. |
|
|
118
118
|
| POST | `/api/bongos/autonomy/fence/priority` | `archon` | `goal_id` | The priority goal (task 1004453): which allowlisted goal the runner works first. |
|
|
119
|
-
| 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. |
|
|
119
|
+
| 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`, `hold_until` | The runner's check-in, once per loop. |
|
|
120
120
|
| PUT | `/api/bongos/autonomy/me/goals` | `metic+archon` | `goal_ids` | A builder picks which allowlisted goals THEIR runner works. |
|
|
121
121
|
| GET | `/api/bongos/autonomy/precheck` | `metic+archon` | — | |
|
|
122
|
+
| GET | `/api/bongos/autonomy/runner-setup.ps1` | `public` | — | the Windows first lines; see the note above. |
|
|
123
|
+
| GET | `/api/bongos/autonomy/runner-setup.sh` | `public` | — | the Mac first lines; see the note above. |
|
|
122
124
|
| 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… |
|
|
125
|
+
| DELETE | `/api/bongos/autonomy/runners/:host` | `any-builder` | — | Forget one of the caller's own devices. |
|
|
126
|
+
| POST | `/api/bongos/autonomy/runners/:host/run` | `metic+archon` | `run` | Run or Stop ONE of the caller's own devices. |
|
|
123
127
|
| 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… |
|
|
124
128
|
| 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). |
|
|
125
129
|
|