@bongos/core 1.19.1010 → 1.19.1012
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 +52 -22
- 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 +6 -0
- package/clients/bongos-client/index.mjs +6 -0
- package/docs/api/openapi.json +67 -1
- package/docs/api-reference.md +8 -1
- package/docs/module-api-changelog.md +4 -0
- package/modules/ideas/module.json +1 -0
- package/modules/ideas/routes/sky-mine.js +34 -0
- package/modules/ideas/sky-mine.js +75 -0
- package/modules/lifecycle/module.json +2 -1
- package/modules/lifecycle/routes/sky.js +37 -0
- package/modules/lifecycle/sky.js +261 -0
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/scripts/gds/gen-file-map.js +29 -12
- package/src/module-api.js +1 -1
- package/tests/file_map.mjs +35 -3
- package/tests/sky_mine.mjs +138 -0
- package/tests/sky_read.mjs +265 -0
package/.bongos-core.json
CHANGED
|
@@ -2,22 +2,22 @@
|
|
|
2
2
|
"artifact": "bongos-core",
|
|
3
3
|
"manifest_schema": 1,
|
|
4
4
|
"generator": "scripts/gds/package-core.js",
|
|
5
|
-
"core_version": "1.19.
|
|
6
|
-
"core_contract": "1.19.
|
|
7
|
-
"source_commit": "
|
|
5
|
+
"core_version": "1.19.1012",
|
|
6
|
+
"core_contract": "1.19.1012",
|
|
7
|
+
"source_commit": "67c8c7ea6e9225abe84f04ee97d072e125b78671",
|
|
8
8
|
"source_ref": "HEAD",
|
|
9
|
-
"built_at": "2026-09-
|
|
9
|
+
"built_at": "2026-09-24T22:32:49.600Z",
|
|
10
10
|
"redaction": {
|
|
11
11
|
"model": "docs-redacted+functional-verbatim",
|
|
12
12
|
"docs_redacted": 523,
|
|
13
13
|
"agent_docs_stubbed": 26,
|
|
14
|
-
"functional_verbatim":
|
|
14
|
+
"functional_verbatim": 2426,
|
|
15
15
|
"rules": 3,
|
|
16
16
|
"gate_literals": 3,
|
|
17
17
|
"gate": "passed"
|
|
18
18
|
},
|
|
19
|
-
"file_count":
|
|
20
|
-
"tree_sha256": "
|
|
19
|
+
"file_count": 2975,
|
|
20
|
+
"tree_sha256": "43775a7c655de35e08a0b90ecee94c1ccad0cc2e460df21d0b3b5d463e6fb7e2",
|
|
21
21
|
"files": [
|
|
22
22
|
{
|
|
23
23
|
"path": ".claude/skills/ask-for-help/SKILL.md",
|
|
@@ -352,12 +352,12 @@
|
|
|
352
352
|
{
|
|
353
353
|
"path": "clients/bongos-client/README.md",
|
|
354
354
|
"mode": "0000644",
|
|
355
|
-
"sha256": "
|
|
355
|
+
"sha256": "26e3e9bd1e4dc4e7715eaabfdc155b98da64eefc2c002a18f4c5da0b5b288baa"
|
|
356
356
|
},
|
|
357
357
|
{
|
|
358
358
|
"path": "clients/bongos-client/bongos-client.global.js",
|
|
359
359
|
"mode": "0000644",
|
|
360
|
-
"sha256": "
|
|
360
|
+
"sha256": "6684688f85798c74d0c58853fa54c90e30a69c442708e191a3ef15b8f06ca0fb"
|
|
361
361
|
},
|
|
362
362
|
{
|
|
363
363
|
"path": "clients/bongos-client/examples/hello-world.mjs",
|
|
@@ -367,17 +367,17 @@
|
|
|
367
367
|
{
|
|
368
368
|
"path": "clients/bongos-client/index.cjs",
|
|
369
369
|
"mode": "0000644",
|
|
370
|
-
"sha256": "
|
|
370
|
+
"sha256": "5b844bbe07c67c1ac42f46d8a065d59039a447ca38ca6ae9f3422c081038cd8a"
|
|
371
371
|
},
|
|
372
372
|
{
|
|
373
373
|
"path": "clients/bongos-client/index.d.ts",
|
|
374
374
|
"mode": "0000644",
|
|
375
|
-
"sha256": "
|
|
375
|
+
"sha256": "c339dfc8dc3cf407b2a30a9afed1c29aab87f55f96c7bd8c7316b999bd8c6a96"
|
|
376
376
|
},
|
|
377
377
|
{
|
|
378
378
|
"path": "clients/bongos-client/index.mjs",
|
|
379
379
|
"mode": "0000644",
|
|
380
|
-
"sha256": "
|
|
380
|
+
"sha256": "24cf3312198537eb92a5c2f247faa826f596fae91a44705905bd80a5cdc8c7b0"
|
|
381
381
|
},
|
|
382
382
|
{
|
|
383
383
|
"path": "clients/bongos-client/package.json",
|
|
@@ -2162,12 +2162,12 @@
|
|
|
2162
2162
|
{
|
|
2163
2163
|
"path": "docs/api-reference.md",
|
|
2164
2164
|
"mode": "0000644",
|
|
2165
|
-
"sha256": "
|
|
2165
|
+
"sha256": "e09fe547287b2baea31a2bf0326dbc9c123c0d85786ac3db42669b7496bfe9fe"
|
|
2166
2166
|
},
|
|
2167
2167
|
{
|
|
2168
2168
|
"path": "docs/api/openapi.json",
|
|
2169
2169
|
"mode": "0000644",
|
|
2170
|
-
"sha256": "
|
|
2170
|
+
"sha256": "a4b3d6be3fdd2b518f046c7db5849435d73cbaaf9b8f2247e08ca2243f52475c"
|
|
2171
2171
|
},
|
|
2172
2172
|
{
|
|
2173
2173
|
"path": "docs/architecture.md",
|
|
@@ -2727,7 +2727,7 @@
|
|
|
2727
2727
|
{
|
|
2728
2728
|
"path": "docs/module-api-changelog.md",
|
|
2729
2729
|
"mode": "0000644",
|
|
2730
|
-
"sha256": "
|
|
2730
|
+
"sha256": "6a78c943439f5d8b591f285c69db81d7a468e4e18656d04330685885ed2cbbd8"
|
|
2731
2731
|
},
|
|
2732
2732
|
{
|
|
2733
2733
|
"path": "docs/modules-contract.md",
|
|
@@ -5637,7 +5637,7 @@
|
|
|
5637
5637
|
{
|
|
5638
5638
|
"path": "modules/ideas/module.json",
|
|
5639
5639
|
"mode": "0000644",
|
|
5640
|
-
"sha256": "
|
|
5640
|
+
"sha256": "96dc50c3ab602ea22329d3fff484113a7381cfe840d06f3ee51132ea09ea18f0"
|
|
5641
5641
|
},
|
|
5642
5642
|
{
|
|
5643
5643
|
"path": "modules/ideas/pollers/descent-writer.js",
|
|
@@ -5674,6 +5674,11 @@
|
|
|
5674
5674
|
"mode": "0000644",
|
|
5675
5675
|
"sha256": "92c10dbffef40038dac64ea646372e3fcd1c70c5d2bda1d731ddbdcd508d9181"
|
|
5676
5676
|
},
|
|
5677
|
+
{
|
|
5678
|
+
"path": "modules/ideas/routes/sky-mine.js",
|
|
5679
|
+
"mode": "0000644",
|
|
5680
|
+
"sha256": "a58dc499fd86af7499de613e61762e8adee88497dadad30f7f651aaafbbf10e3"
|
|
5681
|
+
},
|
|
5677
5682
|
{
|
|
5678
5683
|
"path": "modules/ideas/routing.js",
|
|
5679
5684
|
"mode": "0000644",
|
|
@@ -5684,6 +5689,11 @@
|
|
|
5684
5689
|
"mode": "0000644",
|
|
5685
5690
|
"sha256": "eb6a5cecb3ce54aeb0c85ffb752eb12a2400d0d4f5c7d48e4e05ff3cf7baf712"
|
|
5686
5691
|
},
|
|
5692
|
+
{
|
|
5693
|
+
"path": "modules/ideas/sky-mine.js",
|
|
5694
|
+
"mode": "0000644",
|
|
5695
|
+
"sha256": "00ea7dcd84d31ef6f5f052ed200abcc0f3c58267af0fc7cd8cebc567d4ffeb28"
|
|
5696
|
+
},
|
|
5687
5697
|
{
|
|
5688
5698
|
"path": "modules/ideas/templates.js",
|
|
5689
5699
|
"mode": "0000644",
|
|
@@ -6027,7 +6037,7 @@
|
|
|
6027
6037
|
{
|
|
6028
6038
|
"path": "modules/lifecycle/module.json",
|
|
6029
6039
|
"mode": "0000644",
|
|
6030
|
-
"sha256": "
|
|
6040
|
+
"sha256": "472161627fdeb33b628eb3d9b4d4d58eba13dc74dacee1f661fc79856496cff8"
|
|
6031
6041
|
},
|
|
6032
6042
|
{
|
|
6033
6043
|
"path": "modules/lifecycle/pg-constraint-fail.js",
|
|
@@ -6159,6 +6169,11 @@
|
|
|
6159
6169
|
"mode": "0000644",
|
|
6160
6170
|
"sha256": "2ab5931bd936c88a1e3a4339d927ef537e998f9756fc3260671f2bf701cd7dfa"
|
|
6161
6171
|
},
|
|
6172
|
+
{
|
|
6173
|
+
"path": "modules/lifecycle/routes/sky.js",
|
|
6174
|
+
"mode": "0000644",
|
|
6175
|
+
"sha256": "1f058f4bd1033666daff1babf1cf64e9ea303ef87f9cd71fba9f3ad2815c4287"
|
|
6176
|
+
},
|
|
6162
6177
|
{
|
|
6163
6178
|
"path": "modules/lifecycle/routes/task-route-helpers.js",
|
|
6164
6179
|
"mode": "0000644",
|
|
@@ -6209,6 +6224,11 @@
|
|
|
6209
6224
|
"mode": "0000644",
|
|
6210
6225
|
"sha256": "e2d77bd858cc5aff1984ad6fd22f5441014cc92b9d610cacfca2a3d2861f0bc2"
|
|
6211
6226
|
},
|
|
6227
|
+
{
|
|
6228
|
+
"path": "modules/lifecycle/sky.js",
|
|
6229
|
+
"mode": "0000644",
|
|
6230
|
+
"sha256": "e325fd288ff7a71c3db31d4d9756666d2a386ad25c3b9dd0a1bab3e5bec67be8"
|
|
6231
|
+
},
|
|
6212
6232
|
{
|
|
6213
6233
|
"path": "modules/lifecycle/task-classifier.js",
|
|
6214
6234
|
"mode": "0000644",
|
|
@@ -8222,12 +8242,12 @@
|
|
|
8222
8242
|
{
|
|
8223
8243
|
"path": "package-lock.json",
|
|
8224
8244
|
"mode": "0000644",
|
|
8225
|
-
"sha256": "
|
|
8245
|
+
"sha256": "b26e2dff351ba48f806de1851a00dc5657a52ceb0f6c2ec66bf0b407f074ca49"
|
|
8226
8246
|
},
|
|
8227
8247
|
{
|
|
8228
8248
|
"path": "package.json",
|
|
8229
8249
|
"mode": "0000644",
|
|
8230
|
-
"sha256": "
|
|
8250
|
+
"sha256": "05dadaedb82b7aac68954714ab5dba673cc5e19adc0bea7109c2951bfe8692c3"
|
|
8231
8251
|
},
|
|
8232
8252
|
{
|
|
8233
8253
|
"path": "public-docs/index.html",
|
|
@@ -8877,7 +8897,7 @@
|
|
|
8877
8897
|
{
|
|
8878
8898
|
"path": "scripts/gds/gen-file-map.js",
|
|
8879
8899
|
"mode": "0000644",
|
|
8880
|
-
"sha256": "
|
|
8900
|
+
"sha256": "38505bcbacd92114abbbd06cbc41bc841e1269cb11ebaace395f3ad22104ba1a"
|
|
8881
8901
|
},
|
|
8882
8902
|
{
|
|
8883
8903
|
"path": "scripts/gds/gen-freshness.js",
|
|
@@ -10272,7 +10292,7 @@
|
|
|
10272
10292
|
{
|
|
10273
10293
|
"path": "src/module-api.js",
|
|
10274
10294
|
"mode": "0000644",
|
|
10275
|
-
"sha256": "
|
|
10295
|
+
"sha256": "d575c9f71dfced09c23cf793d5e0d048d240621a588e65f375d47bf96cd6e006"
|
|
10276
10296
|
},
|
|
10277
10297
|
{
|
|
10278
10298
|
"path": "src/module-loader/catalog.js",
|
|
@@ -11542,7 +11562,7 @@
|
|
|
11542
11562
|
{
|
|
11543
11563
|
"path": "tests/file_map.mjs",
|
|
11544
11564
|
"mode": "0000644",
|
|
11545
|
-
"sha256": "
|
|
11565
|
+
"sha256": "b4bdd09b0c11bb8d12677b48d1758603d3bc210511b090d7cc6de2f6d2b37cc0"
|
|
11546
11566
|
},
|
|
11547
11567
|
{
|
|
11548
11568
|
"path": "tests/filing_abuse_matrix.mjs",
|
|
@@ -14309,6 +14329,16 @@
|
|
|
14309
14329
|
"mode": "0000644",
|
|
14310
14330
|
"sha256": "db9e246f1ce7ef6306b938d325c450e31f2e834244f64dd2f0aaea96e760d987"
|
|
14311
14331
|
},
|
|
14332
|
+
{
|
|
14333
|
+
"path": "tests/sky_mine.mjs",
|
|
14334
|
+
"mode": "0000644",
|
|
14335
|
+
"sha256": "799fdbebfc405f42e658a5575c5291ac7932be3fc0f16f5006e8a5656c7e8661"
|
|
14336
|
+
},
|
|
14337
|
+
{
|
|
14338
|
+
"path": "tests/sky_read.mjs",
|
|
14339
|
+
"mode": "0000644",
|
|
14340
|
+
"sha256": "44db7c5b3cdf12cb0f4e7dc46e6677280a4c9796664ac117f690d833c8a5ea46"
|
|
14341
|
+
},
|
|
14312
14342
|
{
|
|
14313
14343
|
"path": "tests/smoke_preflight.mjs",
|
|
14314
14344
|
"mode": "0000644",
|
|
@@ -5,7 +5,7 @@ A **generated**, zero-dependency typed client for the Bongos API — produced fr
|
|
|
5
5
|
by hand; it regenerates when the spec changes, so it can never drift from the routes.
|
|
6
6
|
|
|
7
7
|
- API version: **v1** (served at `/api/bongos/v1`)
|
|
8
|
-
-
|
|
8
|
+
- 416 operations across 62 resource groups
|
|
9
9
|
|
|
10
10
|
## Use it from your project
|
|
11
11
|
|
|
@@ -884,6 +884,12 @@ function createClient(opts = {}) {
|
|
|
884
884
|
// GET /sessions/upload-health — rank: metic+archon — GET /sessions/upload-health
|
|
885
885
|
getSessionsUploadHealth: (args) => request("GET", "/sessions/upload-health", { hasBody: false }, args),
|
|
886
886
|
},
|
|
887
|
+
"sky": {
|
|
888
|
+
// GET /sky — rank: any-builder — GET /sky
|
|
889
|
+
getSky: (args) => request("GET", "/sky", { hasBody: false }, args),
|
|
890
|
+
// GET /sky/mine — rank: any-builder — GET /sky/mine
|
|
891
|
+
getSkyMine: (args) => request("GET", "/sky/mine", { hasBody: false }, args),
|
|
892
|
+
},
|
|
887
893
|
"specialities": {
|
|
888
894
|
// GET /specialities — rank: any-builder — GET /specialities
|
|
889
895
|
getSpecialities: (args) => request("GET", "/specialities", { hasBody: false }, args),
|
|
@@ -883,6 +883,12 @@ function createClient(opts = {}) {
|
|
|
883
883
|
// GET /sessions/upload-health — rank: metic+archon — GET /sessions/upload-health
|
|
884
884
|
getSessionsUploadHealth: (args) => request("GET", "/sessions/upload-health", { hasBody: false }, args),
|
|
885
885
|
},
|
|
886
|
+
"sky": {
|
|
887
|
+
// GET /sky — rank: any-builder — GET /sky
|
|
888
|
+
getSky: (args) => request("GET", "/sky", { hasBody: false }, args),
|
|
889
|
+
// GET /sky/mine — rank: any-builder — GET /sky/mine
|
|
890
|
+
getSkyMine: (args) => request("GET", "/sky/mine", { hasBody: false }, args),
|
|
891
|
+
},
|
|
886
892
|
"specialities": {
|
|
887
893
|
// GET /specialities — rank: any-builder — GET /specialities
|
|
888
894
|
getSpecialities: (args) => request("GET", "/specialities", { hasBody: false }, args),
|
|
@@ -1270,6 +1270,12 @@ export interface BongosClient {
|
|
|
1270
1270
|
/** GET /sessions/upload-health — rank: metic+archon */
|
|
1271
1271
|
getSessionsUploadHealth(args?: RequestArgs): Promise<ApiResponse>;
|
|
1272
1272
|
};
|
|
1273
|
+
"sky": {
|
|
1274
|
+
/** GET /sky — rank: any-builder */
|
|
1275
|
+
getSky(args?: RequestArgs): Promise<ApiResponse>;
|
|
1276
|
+
/** GET /sky/mine — rank: any-builder */
|
|
1277
|
+
getSkyMine(args?: RequestArgs): Promise<ApiResponse>;
|
|
1278
|
+
};
|
|
1273
1279
|
"specialities": {
|
|
1274
1280
|
/** GET /specialities — rank: any-builder */
|
|
1275
1281
|
getSpecialities(args?: RequestArgs): Promise<GetSpecialitiesResponse>;
|
|
@@ -880,6 +880,12 @@ export function createClient(opts = {}) {
|
|
|
880
880
|
// GET /sessions/upload-health — rank: metic+archon — GET /sessions/upload-health
|
|
881
881
|
getSessionsUploadHealth: (args) => request("GET", "/sessions/upload-health", { hasBody: false }, args),
|
|
882
882
|
},
|
|
883
|
+
"sky": {
|
|
884
|
+
// GET /sky — rank: any-builder — GET /sky
|
|
885
|
+
getSky: (args) => request("GET", "/sky", { hasBody: false }, args),
|
|
886
|
+
// GET /sky/mine — rank: any-builder — GET /sky/mine
|
|
887
|
+
getSkyMine: (args) => request("GET", "/sky/mine", { hasBody: false }, args),
|
|
888
|
+
},
|
|
883
889
|
"specialities": {
|
|
884
890
|
// GET /specialities — rank: any-builder — GET /specialities
|
|
885
891
|
getSpecialities: (args) => request("GET", "/specialities", { hasBody: false }, args),
|
package/docs/api/openapi.json
CHANGED
|
@@ -237,6 +237,10 @@
|
|
|
237
237
|
"name": "sessions",
|
|
238
238
|
"description": "Endpoints under `/api/bongos/sessions`."
|
|
239
239
|
},
|
|
240
|
+
{
|
|
241
|
+
"name": "sky",
|
|
242
|
+
"description": "Endpoints under `/api/bongos/sky`."
|
|
243
|
+
},
|
|
240
244
|
{
|
|
241
245
|
"name": "specialities",
|
|
242
246
|
"description": "Endpoints under `/api/bongos/specialities`."
|
|
@@ -15855,6 +15859,68 @@
|
|
|
15855
15859
|
]
|
|
15856
15860
|
}
|
|
15857
15861
|
},
|
|
15862
|
+
"/sky": {
|
|
15863
|
+
"get": {
|
|
15864
|
+
"operationId": "get_sky",
|
|
15865
|
+
"tags": [
|
|
15866
|
+
"sky"
|
|
15867
|
+
],
|
|
15868
|
+
"summary": "GET /sky",
|
|
15869
|
+
"description": "GET /sky, the whole project sky (task 1004230, ADR 0331). The same gate as GET /goals/graph, for the same reason: the viewer decides which private goals come back with their prose, and that decision is made from the authenticated request inside the read. Deliberately NOT pinned in route-rank-check: a read with no floor above sign-in has no downgrade to catch (the /inbox/sparks precedent).\n\n**Rank:** `any-builder` — Any authenticated builder (row-level ownership enforced in-handler).",
|
|
15870
|
+
"x-rank": "any-builder",
|
|
15871
|
+
"x-source": "modules/lifecycle/routes/sky.js",
|
|
15872
|
+
"responses": {
|
|
15873
|
+
"200": {
|
|
15874
|
+
"description": "Success."
|
|
15875
|
+
},
|
|
15876
|
+
"400": {
|
|
15877
|
+
"$ref": "#/components/responses/BadRequest"
|
|
15878
|
+
},
|
|
15879
|
+
"401": {
|
|
15880
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
15881
|
+
},
|
|
15882
|
+
"403": {
|
|
15883
|
+
"$ref": "#/components/responses/Forbidden"
|
|
15884
|
+
}
|
|
15885
|
+
},
|
|
15886
|
+
"security": [
|
|
15887
|
+
{
|
|
15888
|
+
"builderSession": []
|
|
15889
|
+
}
|
|
15890
|
+
]
|
|
15891
|
+
}
|
|
15892
|
+
},
|
|
15893
|
+
"/sky/mine": {
|
|
15894
|
+
"get": {
|
|
15895
|
+
"operationId": "get_sky_mine",
|
|
15896
|
+
"tags": [
|
|
15897
|
+
"sky"
|
|
15898
|
+
],
|
|
15899
|
+
"summary": "GET /sky/mine",
|
|
15900
|
+
"description": "GET /sky/mine, every thought the SIGNED-IN builder filed with its state, size and descent, capped at 1000 (task 1004230). The builder is the caller: there is no id in the path, so nobody can read a trail as somebody else through this route. The viewer's rank rides into the read so the skill-friction gate holds here as it does on the trail. Deliberately NOT pinned in route-rank-check (the /inbox/sparks precedent: a read with no floor above sign-in has no downgrade to catch).\n\n**Rank:** `any-builder` — Any authenticated builder (row-level ownership enforced in-handler).",
|
|
15901
|
+
"x-rank": "any-builder",
|
|
15902
|
+
"x-source": "modules/ideas/routes/sky-mine.js",
|
|
15903
|
+
"responses": {
|
|
15904
|
+
"200": {
|
|
15905
|
+
"description": "Success."
|
|
15906
|
+
},
|
|
15907
|
+
"400": {
|
|
15908
|
+
"$ref": "#/components/responses/BadRequest"
|
|
15909
|
+
},
|
|
15910
|
+
"401": {
|
|
15911
|
+
"$ref": "#/components/responses/Unauthorized"
|
|
15912
|
+
},
|
|
15913
|
+
"403": {
|
|
15914
|
+
"$ref": "#/components/responses/Forbidden"
|
|
15915
|
+
}
|
|
15916
|
+
},
|
|
15917
|
+
"security": [
|
|
15918
|
+
{
|
|
15919
|
+
"builderSession": []
|
|
15920
|
+
}
|
|
15921
|
+
]
|
|
15922
|
+
}
|
|
15923
|
+
},
|
|
15858
15924
|
"/specialities": {
|
|
15859
15925
|
"get": {
|
|
15860
15926
|
"operationId": "get_specialities",
|
|
@@ -26348,7 +26414,7 @@
|
|
|
26348
26414
|
"description": "A required dependency/feature is not configured or is temporarily down."
|
|
26349
26415
|
}
|
|
26350
26416
|
},
|
|
26351
|
-
"x-endpoint-count":
|
|
26417
|
+
"x-endpoint-count": 416,
|
|
26352
26418
|
"x-schema-count": 453,
|
|
26353
26419
|
"x-undocumented-bodies": 9,
|
|
26354
26420
|
"x-response-schemas": 308,
|
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. 416 endpoints across 70 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`.
|
|
@@ -623,6 +623,13 @@ Base path: `/api/bongos`. Ranks (enforced server-side, [ADR 0016](adr/0016-trust
|
|
|
623
623
|
| GET | `/api/bongos/sessions/search` | `metic+archon` | — | cross-builder corpus search (BFG-principal posture until 6C.1). |
|
|
624
624
|
| GET | `/api/bongos/sessions/upload-health` | `metic+archon` | — | GET /sessions/upload-health — the answer to "has anyone's session upload silently stopped?", which before task 1003865 existed ONLY as a … |
|
|
625
625
|
|
|
626
|
+
## `sky` (2)
|
|
627
|
+
|
|
628
|
+
| Method | Path | Rank | Body | Description |
|
|
629
|
+
|---|---|---|---|---|
|
|
630
|
+
| GET | `/api/bongos/sky` | `any-builder` | — | GET /sky, the whole project sky (task 1004230, ADR 0331). |
|
|
631
|
+
| GET | `/api/bongos/sky/mine` | `any-builder` | — | GET /sky/mine, every thought the SIGNED-IN builder filed with its state, size and descent, capped at 1000 (task 1004230). |
|
|
632
|
+
|
|
626
633
|
## `specialities` (12)
|
|
627
634
|
|
|
628
635
|
| Method | Path | Rank | Body | Description |
|
|
@@ -2494,5 +2494,9 @@ is load-bearing: the script throws rather than guess if it is missing, and
|
|
|
2494
2494
|
landed since 1.19.1008 with no explicit bump. run 36056558236. (task 1002620)
|
|
2495
2495
|
1.19.1010 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
|
|
2496
2496
|
landed since 1.19.1009 with no explicit bump. run 36064558803. (task 1002620)
|
|
2497
|
+
1.19.1011 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
|
|
2498
|
+
landed since 1.19.1010 with no explicit bump. run 36066617514. (task 1002620)
|
|
2499
|
+
1.19.1012 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
|
|
2500
|
+
landed since 1.19.1011 with no explicit bump. run 36067980398. (task 1002620)
|
|
2497
2501
|
---------------------------------------------------------------------------
|
|
2498
2502
|
```
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// modules/ideas/routes/sky-mine.js — GET /sky/mine, the caller's whole trail in
|
|
4
|
+
// one read (task 1004230, sky part 2 of 5; ADR 0331).
|
|
5
|
+
//
|
|
6
|
+
// ITS OWN FILE, not more of inbox.js, for the reason ratify-goal.js gives: inbox
|
|
7
|
+
// is INTAKE, and this is a read of what a person's intake became. The read and
|
|
8
|
+
// its cap live in ../sky-mine.js so a test drives them with no express.
|
|
9
|
+
//
|
|
10
|
+
// The path is `/sky/mine` beside the lifecycle module's `/sky`: two modules, one
|
|
11
|
+
// surface to the page. Express matches whole paths, so neither swallows the
|
|
12
|
+
// other whichever mounts first — and no `:id` route exists under `/sky` to bind
|
|
13
|
+
// the literal `mine` (the `/inbox/:id` trap this module's CLAUDE.md records).
|
|
14
|
+
//
|
|
15
|
+
// MODULE BOUNDARY: reaches core only through `../../../src/module-api`.
|
|
16
|
+
|
|
17
|
+
const express = require('express');
|
|
18
|
+
const api = require('../../../src/module-api');
|
|
19
|
+
const skyMine = require('../sky-mine');
|
|
20
|
+
|
|
21
|
+
module.exports = function buildSkyMineRouter() {
|
|
22
|
+
const router = express.Router();
|
|
23
|
+
|
|
24
|
+
// rank: any-builder — GET /sky/mine, every thought the SIGNED-IN builder filed
|
|
25
|
+
// with its state, size and descent, capped at 1000 (task 1004230). The builder
|
|
26
|
+
// is the caller: there is no id in the path, so nobody can read a trail as
|
|
27
|
+
// somebody else through this route. The viewer's rank rides into the read so
|
|
28
|
+
// the skill-friction gate holds here as it does on the trail. Deliberately NOT
|
|
29
|
+
// pinned in route-rank-check (the /inbox/sparks precedent: a read with no floor
|
|
30
|
+
// above sign-in has no downgrade to catch).
|
|
31
|
+
router.get('/sky/mine', api.requireBuilder, api.asyncHandler('GET /sky/mine', skyMine.skyMineHandler(), { errorCode: 'sky_mine_failed' }));
|
|
32
|
+
|
|
33
|
+
return router;
|
|
34
|
+
};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// modules/ideas/sky-mine.js — THE CALLER'S WHOLE TRAIL IN ONE READ (task
|
|
4
|
+
// 1004230, sky part 2 of 5; goal 1000095; ADR 0331).
|
|
5
|
+
//
|
|
6
|
+
// WHY. The ideator's sky draws every thought a person filed at once — its state,
|
|
7
|
+
// its size, its descent — and the trail route (`GET /inbox/by-builder/:id`) pages
|
|
8
|
+
// that at a hundred rows. The prototype walked the pages itself; the page should
|
|
9
|
+
// not. This read walks them server-side and hands back every row, the same rows
|
|
10
|
+
// the room shows, so the sky and the room can never disagree about a thought.
|
|
11
|
+
//
|
|
12
|
+
// THE SAME ROWS, LITERALLY. Each page is `listIdeaTrailForBuilder` — the trail's
|
|
13
|
+
// own projection — and the three attachers run over the whole set afterwards in
|
|
14
|
+
// the trail route's order: the descent (the walk), then size (what the walk
|
|
15
|
+
// paid), then state (which of the five objects — last, because it takes its
|
|
16
|
+
// share off the size just left on the row). Nothing is derived here that the
|
|
17
|
+
// room does not derive; ADR 0322 says the five states are derived ONCE, and this
|
|
18
|
+
// file keeps that true by calling the one derivation rather than adding a second.
|
|
19
|
+
//
|
|
20
|
+
// THE CAP. A thousand rows. The trail's own page cap is a hundred, so this is at
|
|
21
|
+
// most ten reads; a filer past a thousand thoughts gets the newest thousand and a
|
|
22
|
+
// `truncated: true` the page can say out loud, never a silent slice. Ten reads
|
|
23
|
+
// for the sky is still one request from the page, which is the point.
|
|
24
|
+
//
|
|
25
|
+
// WHOSE. The builder is the signed-in caller, from the request, never a URL
|
|
26
|
+
// parameter — the room reads `/me` for the same reason: a trail is a person's,
|
|
27
|
+
// and the route that lets you name a person is the other one.
|
|
28
|
+
|
|
29
|
+
const inbox = require('./inbox');
|
|
30
|
+
const { attachDescentToTrail } = require('./trail-descent');
|
|
31
|
+
const { attachSizeToTrail } = require('./trail-size');
|
|
32
|
+
const { attachStateToTrail } = require('./idea-state');
|
|
33
|
+
|
|
34
|
+
const SKY_MINE_CAP = 1000;
|
|
35
|
+
|
|
36
|
+
// readSkyMine — page the trail to the cap, then attach the three facts once
|
|
37
|
+
// over the whole set. `deps` lets a test stand in for each read and each
|
|
38
|
+
// attacher; production passes none and gets the trail's own.
|
|
39
|
+
async function readSkyMine({ builderId, viewerRank = null } = {}, deps = {}) {
|
|
40
|
+
const list = deps.listIdeaTrailForBuilder || inbox.listIdeaTrailForBuilder;
|
|
41
|
+
const count = deps.countIdeaTrailForBuilder || inbox.countIdeaTrailForBuilder;
|
|
42
|
+
const descent = deps.attachDescentToTrail || attachDescentToTrail;
|
|
43
|
+
const size = deps.attachSizeToTrail || attachSizeToTrail;
|
|
44
|
+
const state = deps.attachStateToTrail || attachStateToTrail;
|
|
45
|
+
const cap = Number.isInteger(deps.cap) && deps.cap > 0 ? deps.cap : SKY_MINE_CAP;
|
|
46
|
+
const pageSize = inbox.IDEA_TRAIL_MAX_LIMIT;
|
|
47
|
+
|
|
48
|
+
const ideas = [];
|
|
49
|
+
const total = await count(builderId, { viewerRank });
|
|
50
|
+
for (let offset = 0; offset < Math.min(total, cap); offset += pageSize) {
|
|
51
|
+
const limit = Math.min(pageSize, cap - offset);
|
|
52
|
+
const page = await list(builderId, { limit, offset, viewerRank });
|
|
53
|
+
ideas.push(...page);
|
|
54
|
+
if (page.length < limit) break;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
await descent(ideas);
|
|
58
|
+
await size(ideas);
|
|
59
|
+
await state(ideas);
|
|
60
|
+
|
|
61
|
+
return { builder_id: builderId, ideas, total, cap, truncated: total > ideas.length };
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// skyMineHandler — GET /sky/mine. A factory so a test drives it with a stub
|
|
65
|
+
// read and no database. Identity is the authenticated builder's, always.
|
|
66
|
+
function skyMineHandler({ read = readSkyMine } = {}) {
|
|
67
|
+
return async function getSkyMine(req, res) {
|
|
68
|
+
const builderId = Number(req.builder.id);
|
|
69
|
+
const viewerRank = req.builder && req.builder.rank;
|
|
70
|
+
const out = await read({ builderId, viewerRank });
|
|
71
|
+
return res.json(out);
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
module.exports = { readSkyMine, skyMineHandler, SKY_MINE_CAP };
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// modules/lifecycle/routes/sky.js — GET /sky, the project sky in one read (task
|
|
4
|
+
// 1004230, sky part 2 of 5; ADR 0331, ADR 0227 §11).
|
|
5
|
+
//
|
|
6
|
+
// WHY ITS OWN ROUTE FILE. goals.js is the goal board's surface and already
|
|
7
|
+
// mounts the graph and the forest; the sky is a third view over the same rows,
|
|
8
|
+
// and the one line here is the mount. The data, the cache and the handler live
|
|
9
|
+
// in ../sky.js so a test drives them with no express and no database.
|
|
10
|
+
//
|
|
11
|
+
// The path is `/sky`, top-level, never `/goals/sky`: the ideas module contributes
|
|
12
|
+
// `/sky/mine` (the caller's own trail), and the two are one surface to the page
|
|
13
|
+
// even though they are two modules' reads. Express matches whole paths, so
|
|
14
|
+
// `/sky` cannot swallow `/sky/mine` whichever module mounts first.
|
|
15
|
+
//
|
|
16
|
+
// MODULE BOUNDARY: reaches core only through the published doorway
|
|
17
|
+
// `../../../src/module-api`; `../sky` is this module's own read.
|
|
18
|
+
|
|
19
|
+
const express = require('express');
|
|
20
|
+
const api = require('../../../src/module-api');
|
|
21
|
+
const sky = require('../sky');
|
|
22
|
+
|
|
23
|
+
const log = api.logger('lifecycle');
|
|
24
|
+
|
|
25
|
+
module.exports = function buildSkyRouter() {
|
|
26
|
+
const router = express.Router();
|
|
27
|
+
|
|
28
|
+
// rank: any-builder — GET /sky, the whole project sky (task 1004230, ADR 0331).
|
|
29
|
+
// The same gate as GET /goals/graph, for the same reason: the viewer decides
|
|
30
|
+
// which private goals come back with their prose, and that decision is made
|
|
31
|
+
// from the authenticated request inside the read. Deliberately NOT pinned in
|
|
32
|
+
// route-rank-check: a read with no floor above sign-in has no downgrade to
|
|
33
|
+
// catch (the /inbox/sparks precedent).
|
|
34
|
+
router.get('/sky', api.requireBuilder, sky.skyHandler({ log }));
|
|
35
|
+
|
|
36
|
+
return router;
|
|
37
|
+
};
|