@bongos/core 1.19.336 → 1.19.337
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
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
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.337",
|
|
6
|
+
"core_contract": "1.19.337",
|
|
7
|
+
"source_commit": "a1079dd09b8ae45b780cdcab81eb44696be21f01",
|
|
8
8
|
"source_ref": "HEAD",
|
|
9
|
-
"built_at": "2026-08-
|
|
9
|
+
"built_at": "2026-08-25T01:01:18.995Z",
|
|
10
10
|
"redaction": {
|
|
11
11
|
"model": "docs-redacted+functional-verbatim",
|
|
12
12
|
"docs_redacted": 325,
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"gate": "passed"
|
|
18
18
|
},
|
|
19
19
|
"file_count": 1830,
|
|
20
|
-
"tree_sha256": "
|
|
20
|
+
"tree_sha256": "39cc259330321323f293c3d933377998d7c3cf229570269ccbf77fa1bef52857",
|
|
21
21
|
"files": [
|
|
22
22
|
{
|
|
23
23
|
"path": ".claude/skills/blocker-review/SKILL.md",
|
|
@@ -4427,7 +4427,7 @@
|
|
|
4427
4427
|
{
|
|
4428
4428
|
"path": "modules/provisioning/routes/provisioning.js",
|
|
4429
4429
|
"mode": "0000644",
|
|
4430
|
-
"sha256": "
|
|
4430
|
+
"sha256": "b9762b6b76d4ee7f57a3a8c37f126eb768ff8c90e194a575dddc7704a534062d"
|
|
4431
4431
|
},
|
|
4432
4432
|
{
|
|
4433
4433
|
"path": "modules/provisioning/tests/liveness.mjs",
|
|
@@ -4727,12 +4727,12 @@
|
|
|
4727
4727
|
{
|
|
4728
4728
|
"path": "package-lock.json",
|
|
4729
4729
|
"mode": "0000644",
|
|
4730
|
-
"sha256": "
|
|
4730
|
+
"sha256": "6e1f14fea8a5dac393261b47a9563eabca0bda30f2c9a6d56f22e17f548c42aa"
|
|
4731
4731
|
},
|
|
4732
4732
|
{
|
|
4733
4733
|
"path": "package.json",
|
|
4734
4734
|
"mode": "0000644",
|
|
4735
|
-
"sha256": "
|
|
4735
|
+
"sha256": "b3c8163bb92a02b01ca2ec14a46b8b1b3c25f1e6ae25001b0fea4a2303820713"
|
|
4736
4736
|
},
|
|
4737
4737
|
{
|
|
4738
4738
|
"path": "public-docs/index.html",
|
|
@@ -6557,7 +6557,7 @@
|
|
|
6557
6557
|
{
|
|
6558
6558
|
"path": "src/module-api.js",
|
|
6559
6559
|
"mode": "0000644",
|
|
6560
|
-
"sha256": "
|
|
6560
|
+
"sha256": "8ffe1c3c3683e95f182da6cad74272574cbe1a2d94a9b959221cc71084c1b8d3"
|
|
6561
6561
|
},
|
|
6562
6562
|
{
|
|
6563
6563
|
"path": "src/module-loader/catalog.js",
|
|
@@ -8457,7 +8457,7 @@
|
|
|
8457
8457
|
{
|
|
8458
8458
|
"path": "tests/provisioning_github_app_routes.mjs",
|
|
8459
8459
|
"mode": "0000644",
|
|
8460
|
-
"sha256": "
|
|
8460
|
+
"sha256": "dd53361cf8bd7e517e886701753d64c05c3235995785991558805f493cde529c"
|
|
8461
8461
|
},
|
|
8462
8462
|
{
|
|
8463
8463
|
"path": "tests/provisioning_onboard_mode.mjs",
|
|
@@ -144,7 +144,9 @@ code{font-family:"Fira Code",ui-monospace,SFMono-Regular,monospace;background:rg
|
|
|
144
144
|
// land. Deliberately contains NO backticks and NO ${...} so it survives the outer
|
|
145
145
|
// template literal verbatim; the only server data it reads is the JSON config block
|
|
146
146
|
// written just above it. Fails soft — a poll hiccup just retries; a long wait reveals a
|
|
147
|
-
// manual "open" button rather than ever falsely erroring.
|
|
147
|
+
// manual "open" button rather than ever falsely erroring. The auto-open countdown runs
|
|
148
|
+
// ONLY when this page is the wizard's pop-up; a same-tab return (pop-up blocked) keeps
|
|
149
|
+
// the founder here with the door and a way back to the checklist (task 1003236).
|
|
148
150
|
const CALLBACK_SCRIPT = `
|
|
149
151
|
(function(){
|
|
150
152
|
var cfg=window.__CB_SETUP__||{};
|
|
@@ -153,12 +155,18 @@ const CALLBACK_SCRIPT = `
|
|
|
153
155
|
var target='https://'+domain;
|
|
154
156
|
var pollUrl=location.pathname.replace('/callback','/status')+'?state='+encodeURIComponent(state);
|
|
155
157
|
var steps=document.getElementById('steps'),statusEl=document.getElementById('status');
|
|
156
|
-
var cta=document.getElementById('cta'),go=document.getElementById('go'),foot=document.getElementById('foot');
|
|
158
|
+
var cta=document.getElementById('cta'),go=document.getElementById('go'),foot=document.getElementById('foot'),back=document.getElementById('back');
|
|
159
|
+
/* Opened from the wizard as a pop-up (window.opener alive, or the tab still carries the name the wizard gave it):
|
|
160
|
+
the checklist is in the other tab, so this one may auto-open the instance. Same-tab fallback (pop-up blocked,
|
|
161
|
+
form target=_self): this IS the founder's checklist tab — never navigate it away; offer both doors (task 1003236). */
|
|
162
|
+
var popup=!!window.opener||window.name==='ghAppSetup';
|
|
157
163
|
var finished=false,tries=0,manual=false;
|
|
158
164
|
function dot(n){return steps.querySelector('[data-step="'+n+'"]');}
|
|
159
165
|
function setActive(n){for(var i=1;i<=3;i++){var el=dot(i);if(!el)continue;el.classList.remove('active','done');if(i<n){el.classList.add('done');el.querySelector('.dot').textContent='\\u2713';}else if(i===n){el.classList.add('active');}}}
|
|
160
166
|
function allDone(){for(var i=1;i<=3;i++){var el=dot(i);if(!el)continue;el.classList.remove('active');el.classList.add('done');el.querySelector('.dot').textContent='\\u2713';}}
|
|
161
|
-
function ready(){if(finished)return;finished=true;allDone();statusEl.textContent='Your instance is ready \\u2014 sign in with GitHub to claim it as owner.';cta.classList.remove('hidden');
|
|
167
|
+
function ready(){if(finished)return;finished=true;allDone();statusEl.textContent='Your instance is ready \\u2014 sign in with GitHub to claim it as owner.';cta.classList.remove('hidden');
|
|
168
|
+
if(!popup){go.textContent='Open '+domain+' \\u2192';if(back)back.classList.remove('hidden');if(foot)foot.textContent='Your setup checklist is waiting where you left it \\u2014 finish it first, or open your instance now.';return;}
|
|
169
|
+
var n=4;(function tick(){if(n<=0){location.href=target;return;}go.textContent='Opening '+domain+' in '+n+'\\u2026';n--;setTimeout(tick,1000);})();}
|
|
162
170
|
function failed(){if(finished)return;finished=true;statusEl.textContent='Setup didn\\u2019t finish. Open your instance page and start the GitHub sign-in setup again.';cta.classList.remove('hidden');go.textContent='Open '+domain+' \\u2192';}
|
|
163
171
|
function revealManual(){if(manual||finished)return;manual=true;cta.classList.remove('hidden');go.textContent='Open '+domain+' \\u2192';if(foot)foot.textContent='This is taking a little longer than usual \\u2014 you can open your instance now, or keep waiting.';}
|
|
164
172
|
function schedule(){if(!finished)setTimeout(poll,3000);}
|
|
@@ -195,6 +203,7 @@ function callbackPage({ ok, title, body, state, domain }) {
|
|
|
195
203
|
</div>
|
|
196
204
|
<p class="status-line" id="status">Hang tight — keep this tab open while we finish.</p>
|
|
197
205
|
<div class="cta hidden" id="cta"><a class="btn" id="go" href="https://${esc(domain)}">Open ${esc(domain)} →</a></div>
|
|
206
|
+
<p class="muted hidden" id="back"><a href="/projects?view=new">Finish your remaining setup steps →</a></p>
|
|
198
207
|
<p class="muted" id="foot">This page opens <code>${esc(domain)}</code> for you the moment it’s ready.</p>
|
|
199
208
|
<noscript><p class="muted">When setup finishes, open <a href="https://${esc(domain)}">${esc(domain)}</a> and sign in with GitHub — that first sign-in makes you the owner.</p></noscript>
|
|
200
209
|
</main>
|
package/package-lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bongos/core",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.337",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@bongos/core",
|
|
9
|
-
"version": "1.19.
|
|
9
|
+
"version": "1.19.337",
|
|
10
10
|
"license": "AGPL-3.0-or-later",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"express": "^4.21.2",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bongos/core",
|
|
3
|
-
"version": "1.19.
|
|
3
|
+
"version": "1.19.337",
|
|
4
4
|
"description": "Cloud Bongos — the AI-first build platform core (GDS + platform surfaces + module system), installed as a versioned dependency (ADR 0108).",
|
|
5
5
|
"license": "AGPL-3.0-or-later",
|
|
6
6
|
"main": "src/platform-server.js",
|
package/src/module-api.js
CHANGED
|
@@ -1099,8 +1099,10 @@ const { validateOrRespond, LIMITS, parseId, asyncHandler, corsPublicGet, parsePa
|
|
|
1099
1099
|
// landed since 1.19.334 with no explicit bump. run 32795232997. (task 1002620)
|
|
1100
1100
|
// 1.19.336 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
|
|
1101
1101
|
// landed since 1.19.335 with no explicit bump. run 32795564021. (task 1002620)
|
|
1102
|
+
// 1.19.337 — CI auto-patch (publish-on-merge, ADR 0161): carrier for merges
|
|
1103
|
+
// landed since 1.19.336 with no explicit bump. run 32795896926. (task 1002620)
|
|
1102
1104
|
// ---------------------------------------------------------------------------
|
|
1103
|
-
const CORE_VERSION = '1.19.
|
|
1105
|
+
const CORE_VERSION = '1.19.337'; // CI auto-patch carrier (ADR 0161); see changelog above
|
|
1104
1106
|
|
|
1105
1107
|
// A namespaced logger so a module's log lines are attributable + consistent.
|
|
1106
1108
|
// Usage: const log = api.logger('dev-box'); log.info('mounted');
|
|
@@ -11,10 +11,13 @@
|
|
|
11
11
|
|
|
12
12
|
import { strict as assert } from 'node:assert';
|
|
13
13
|
import { createRequire } from 'node:module';
|
|
14
|
+
import { fileURLToPath } from 'node:url';
|
|
14
15
|
import http from 'node:http';
|
|
15
16
|
|
|
16
17
|
const require = createRequire(import.meta.url);
|
|
17
|
-
|
|
18
|
+
// fileURLToPath, not .pathname: a checkout path with a space reads back percent-encoded
|
|
19
|
+
// (and drive-prefixed) from .pathname on Windows, and require() cannot follow it
|
|
20
|
+
const ROOT = fileURLToPath(new URL('..', import.meta.url));
|
|
18
21
|
|
|
19
22
|
// Stub the data-access fns BEFORE the route factory captures the module object.
|
|
20
23
|
const provisioning = require(`${ROOT}/modules/provisioning/provisioning.js`);
|
|
@@ -92,6 +95,42 @@ console.log('\nGET /provisioning/github-app/callback (the public GitHub redirect
|
|
|
92
95
|
const html = await res.text();
|
|
93
96
|
t('good state → 200 text/html progress page wired to auto-open', res.status === 200 && /text\/html/.test(res.headers.get('content-type') || '') && /Setting up your instance/.test(html) && /Placing credentials/.test(html) && /__CB_SETUP__/.test(html) && html.includes('GOODSTATE'), `status=${res.status}`);
|
|
94
97
|
t('the page names the instance host', /mercury\.example\.com/.test(html));
|
|
98
|
+
// task 1003236: a same-tab return (pop-up blocked → form target=_self) must never be
|
|
99
|
+
// navigated away from the checklist. The page carries a hidden way back, and the
|
|
100
|
+
// countdown sits behind the pop-up guard.
|
|
101
|
+
t('carries a hidden "finish your remaining setup steps" link back to the wizard', /<p class="muted hidden" id="back"><a href="\/projects\?view=new">Finish your remaining setup steps/.test(html));
|
|
102
|
+
t('the auto-open countdown is reachable only past the pop-up guard', /var popup=!!window\.opener\|\|window\.name==='ghAppSetup';/.test(html) && /if\(!popup\)\{[^}]*return;\}\s*var n=4;\(function tick\(\)\{if\(n<=0\)\{location\.href=target;/.test(html) && (html.match(/location\.href=target/g) || []).length === 1);
|
|
103
|
+
|
|
104
|
+
// Run the served script itself (not a copy) against a minimal DOM, once as the
|
|
105
|
+
// wizard's pop-up and once as a same-tab return, and watch what it does to location.
|
|
106
|
+
const script = (html.match(/<script>\s*(\(function\(\)\{[\s\S]*?)<\/script>\s*<\/body>/) || [])[1];
|
|
107
|
+
t('the progress page ships the client script', typeof script === 'string' && script.length > 200);
|
|
108
|
+
async function runCallback({ opener, name }) {
|
|
109
|
+
const vm = await import('node:vm');
|
|
110
|
+
const el = () => { const cls = new Set(); return { textContent: '', classList: { add: (...c) => c.forEach((x) => cls.add(x)), remove: (...c) => c.forEach((x) => cls.delete(x)), contains: (c) => cls.has(c) }, querySelector: () => el() }; };
|
|
111
|
+
const els = { steps: el(), status: el(), cta: el(), go: el(), foot: el(), back: el() };
|
|
112
|
+
els.steps.querySelector = () => el();
|
|
113
|
+
els.back.classList.add('hidden'); els.cta.classList.add('hidden');
|
|
114
|
+
const timers = [];
|
|
115
|
+
const sandbox = {
|
|
116
|
+
__CB_SETUP__: { state: 'GOODSTATE', domain: 'mercury.example.com' },
|
|
117
|
+
opener, name,
|
|
118
|
+
document: { getElementById: (id) => els[id] || null },
|
|
119
|
+
location: { pathname: '/api/bongos/provisioning/github-app/callback', href: 'about:callback' },
|
|
120
|
+
fetch: async () => ({ ok: true, json: async () => ({ ok: true, ready: true, status: 'done' }) }),
|
|
121
|
+
setTimeout: (fn) => { timers.push(fn); return timers.length; },
|
|
122
|
+
encodeURIComponent,
|
|
123
|
+
};
|
|
124
|
+
sandbox.window = sandbox;
|
|
125
|
+
vm.runInNewContext(script, sandbox);
|
|
126
|
+
for (let i = 0; i < 5; i++) await new Promise((r) => setImmediate(r)); // let the poll's promise chain settle
|
|
127
|
+
for (let guard = 0; guard < 10 && timers.length; guard++) { const fn = timers.shift(); fn(); }
|
|
128
|
+
return { href: sandbox.location.href, go: els.go.textContent, backHidden: els.back.classList.contains('hidden'), foot: els.foot.textContent };
|
|
129
|
+
}
|
|
130
|
+
const popup = await runCallback({ opener: {}, name: 'ghAppSetup' });
|
|
131
|
+
t('as the wizard’s pop-up it still counts down and opens the instance', popup.href === 'https://mercury.example.com', JSON.stringify(popup));
|
|
132
|
+
const sameTab = await runCallback({ opener: null, name: '' });
|
|
133
|
+
t('as a same-tab return it stays put: door shown, way back revealed, no navigation', sameTab.href === 'about:callback' && sameTab.go === 'Open mercury.example.com →' && sameTab.backHidden === false && /checklist is waiting/.test(sameTab.foot), JSON.stringify(sameTab));
|
|
95
134
|
}
|
|
96
135
|
{
|
|
97
136
|
const res = await fetch(`${base}/provisioning/github-app/callback?code=X&state=NOPE`);
|