@bongos/core 1.24.75 → 1.24.76

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.
@@ -426,12 +426,63 @@
426
426
  Reconnecting sets up <strong>lasting</strong> access: the hub keeps a key of its own for this repository, so this change and every later upgrade are saved to GitHub without asking you again.</p>`;
427
427
  }
428
428
 
429
+ // ---- the plain status line (task 1005012) ----------------------------------
430
+ //
431
+ // The owner opened this page to put merged work live and found neither a button nor a
432
+ // sentence: the box was already on the newest version — it had moved there by itself on
433
+ // its update rule — and the page said only "nothing to deploy". So the box LEADS with one
434
+ // line in words, up to date or not, and says how the next version reaches it. Every
435
+ // fact in it is the server's: `behind`, the served version and the update rule. The page
436
+ // still compares no versions; it only words what it was told.
437
+ //
438
+ // How the next version arrives depends on the rule alone. On "Stay put" nothing arrives
439
+ // by itself, so saying it would is the one sentence here that could be false.
440
+ const AUTO_RULES = new Set(['patch', 'minor']);
441
+ function nextVersionWords(p) {
442
+ if (AUTO_RULES.has(p.update_channel)) {
443
+ return 'When a newer version is published, it arrives on its own under the update rule below — nothing needs pressing.';
444
+ }
445
+ if (p.update_channel === 'pinned') {
446
+ return 'The update rule below is Stay put, so a newer version waits until you change the update rule.';
447
+ }
448
+ return 'When a newer version is published, a deploy button appears here.';
449
+ }
450
+
451
+ // Merged is not live: a merge reaches this project only inside a published version. On
452
+ // the hall's own view the npm-release module lists where each piece of work has got to,
453
+ // so the line points at it when it is there, and says nothing about a list that is not.
454
+ function waitingWorkWords() {
455
+ const mods = window.__MODULES__;
456
+ const listed = view.isSelf && !!(mods && mods.enabled && mods.enabled['npm-release']);
457
+ return `Work merged after that is not live until a published version carries it${
458
+ listed ? ' — “Where is the work” on this page shows where each piece has got to' : ''}.`;
459
+ }
460
+
461
+ function upToDateHtml(p) {
462
+ const v = escapeHtml(String(p.served_version));
463
+ return `
464
+ <div class="dp-status dp-status--ok" role="status">
465
+ <p class="ov-row__sub"><strong>Up to date.</strong> This project runs core ${v}, the newest version
466
+ it can take. Every piece of merged work inside core ${v} is live. There is nothing to deploy.</p>
467
+ <p class="ov-row__sub">${escapeHtml(nextVersionWords(p))} ${escapeHtml(waitingWorkWords())}</p>
468
+ </div>`;
469
+ }
470
+
471
+ // Behind: the one primary action on the page. It is a PERSON'S button and stays one —
472
+ // the project's law is that going live waits for a person, so pressing it opens the
473
+ // check and the confirm (ADR 0293 D4), and nothing restarts until "Move to …" is pressed.
474
+ // The id is the step-one id it always was, so the two-step wiring is unchanged.
429
475
  function stepOneHtml(p) {
476
+ const to = escapeHtml(String(p.recommended_version));
477
+ const auto = AUTO_RULES.has(p.update_channel)
478
+ ? ' It would also arrive on its own under the update rule below; this does it now.' : '';
430
479
  return `
431
- <p class="ov-row__sub">Core <strong>${escapeHtml(String(p.recommended_version))}</strong> is published and
432
- this box is not on it yet.</p>
433
- <div class="ps-controls">
434
- <button type="button" class="btn" id="dp-preview-${escapeHtml(String(p.instance_id))}">See what would change</button>
480
+ <div class="dp-status dp-status--behind" role="status">
481
+ <p class="ov-row__sub"><strong>Not up to date.</strong> Core <strong>${to}</strong> is published; this project still runs ${escapeHtml(String(p.served_version))}.${auto}</p>
482
+ <div class="ps-controls">
483
+ <button type="button" class="btn btn--primary" id="dp-preview-${escapeHtml(String(p.instance_id))}">Deploy core ${to} now</button>
484
+ </div>
485
+ <p class="ov-row__sub dp-status__note">You see what it brings in and confirm before anything restarts.</p>
435
486
  </div>`;
436
487
  }
437
488
 
@@ -613,7 +664,7 @@
613
664
  if (moving.has(p.instance_id)) action = movingHtml(p);
614
665
  else if (p.open_intent) action = busyHtml(p);
615
666
  else if (p.reading === 'no_answer') action = '';
616
- else if (!p.behind) action = `<p class="ov-row__sub">Nothing newer is published that this box can take. There is nothing to deploy.</p>`;
667
+ else if (!p.behind) action = upToDateHtml(p);
617
668
  else action = step === 'confirm' ? stepTwoHtml(p, isSelf) : stepOneHtml(p);
618
669
  if (!moving.has(p.instance_id)) action += settledHtml(p);
619
670
  return `
@@ -57,7 +57,7 @@
57
57
  const SKY_LABEL = 'The project\'s ideas as a night sky over the city\'s real skyline, with this week\'s ideators ranked beside it';
58
58
  const CITY_LABEL = 'The project as a city: one tower per working area, as tall as what has shipped there, with the builders of the week beside it';
59
59
 
60
- let host = null, model = null, viewerId = null, t = 0, target = 0, raf = null, run = null, lastWeek = -1, shown = false, gallery = null;
60
+ let host = null, model = null, viewerId = null, t = 0, target = 0, raf = null, run = null, lastWeek = -1, shown = false, gallery = null, ideaBox = null;
61
61
  const rungs = new Map();
62
62
 
63
63
  function mode() {
@@ -292,11 +292,15 @@
292
292
 
293
293
  // ---- the artist's Home (task 1005060): in Artistry the same section is the gallery,
294
294
  // home-gallery.js, the bench in the museum the city's art district opens onto ----
295
+ // In Ideating, the idea box (home-idea-box.js) opens Home above the sky, and shows even
296
+ // when the sky could not be read: filing an idea needs no picture of the others.
295
297
  function craftHome() {
296
298
  const art = !!gallery && document.documentElement.dataset.craft === 'artistry';
299
+ const idea = !!ideaBox && craft() === 'ideating';
297
300
  host.classList.toggle('hc--gallery', art);
298
301
  if (gallery) gallery.show(art);
299
- host.hidden = !(art || shown);
302
+ if (ideaBox) ideaBox.show(idea);
303
+ host.hidden = !(art || idea || shown);
300
304
  }
301
305
 
302
306
  // ---- the governor's Home is the street; tests swap the hop for a recorder ----
@@ -338,6 +342,7 @@
338
342
  wireTip();
339
343
  wireDoors();
340
344
  if (window.OTBHomeGallery) gallery = window.OTBHomeGallery.attach(host);
345
+ if (window.OTBHomeIdeaBox) ideaBox = window.OTBHomeIdeaBox.attach(host);
341
346
  document.addEventListener('otb:craft', craftHome);
342
347
  craftHome();
343
348
  new MutationObserver(() => { if (model) drawScene(); }).observe(document.documentElement, { attributes: true, attributeFilter: ['data-theme'] });
@@ -0,0 +1,33 @@
1
+ /* modules/hall-ui/public/home-idea-box.css — the idea box that opens the ideator's Home
2
+ (home-idea-box.js; record modules/hall-ui/records/home-city.md § "The idea box").
3
+ It sits at the top of the city's section, over the sky. Every colour is a hall token
4
+ or a mix of one; the tokens carry both modes, so no rule here is written per mode.
5
+ Every type size and radius is a --ds-* scale token (DESIGN.md, the Fifteen Rule), and
6
+ the narrow layout comes from wrapping rather than a breakpoint, so the sheet adds no
7
+ typed-in value to the design counts. No :root, no motion. */
8
+
9
+ .hib { padding: clamp(16px, 4vw, 28px) clamp(16px, 4vw, 28px) clamp(14px, 3vw, 20px); display: grid; gap: 10px; }
10
+ .hib[hidden] { display: none; }
11
+ .hib-h { margin: 0; font: 600 var(--ds-text-4xl)/1.25 var(--font-display); color: var(--ink); }
12
+ .hib-h label { cursor: text; }
13
+ /* The box takes the row; on a narrow screen the button wraps under it */
14
+ .hib-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; }
15
+ .hib .hib-title {
16
+ width: 100%; min-width: 0; box-sizing: border-box;
17
+ font: 400 var(--ds-text-xl)/1.4 var(--font-body); color: var(--ink);
18
+ background: var(--bg-card); border: var(--line) solid var(--rule-soft); border-radius: var(--radius-sm);
19
+ }
20
+ .hib textarea.hib-title {
21
+ flex: 1 1 16rem; width: auto; min-height: 48px; max-height: 40vh; padding: 12px 20px;
22
+ font-size: var(--ds-text-2xl); line-height: 22px;
23
+ border-radius: var(--ds-radius-panel); resize: none; overflow-y: auto;
24
+ }
25
+ .hib .hib-title::placeholder { color: var(--ink-faint); }
26
+ .hib .hib-title:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-color: transparent; }
27
+ .hib-file { min-height: 48px; padding: 0 22px; font-size: var(--ds-text-lg); flex-shrink: 0; }
28
+ .hib-said { margin: 0; min-height: 1.4em; font: 400 var(--ds-text-md)/1.4 var(--font-body); color: var(--ink-soft); }
29
+ .hib-said--err { color: var(--danger); }
30
+ .hib-said a { color: var(--ink); }
31
+
32
+ /* The setup guide is about building on your own machine; in Ideating, Home opens on the box */
33
+ html[data-craft="ideating"] #welcome-scroll { display: none; }
@@ -0,0 +1,106 @@
1
+ // modules/hall-ui/public/home-idea-box.js — the ideator's Home opens on the idea box
2
+ // (goal 1000095, the owner's "work-first hall", 2026-11-04; record
3
+ // modules/hall-ui/records/home-city.md § "The idea box").
4
+ //
5
+ // In Ideating, the first thing on Home is a place to type an idea and file it; the sky
6
+ // and the ladder of ideators stay under it, secondary. It is ONE box and a button
7
+ // (owner, 2026-11-05: "only one box"): Enter files, Shift+Enter starts a new line, and
8
+ // the box grows with what is typed. The first line is the idea's title, any lines after
9
+ // it its details. Filing is POST /inbox as the sky's quick composer files
10
+ // (sky-composer.js): { title, body_md, kind: 'feature' }. A failed filing keeps the
11
+ // words where they were and says why; a filed one says where it went and links to
12
+ // Your thinking, where every thought the builder filed is listed.
13
+ //
14
+ // It is not a hall widget of its own (Home's stats zone holds one): home-city.js
15
+ // attaches it at the top of its section and shows it when the craft is Ideating, the
16
+ // way it shows the gallery in Artistry. It reads nothing; it writes one thing.
17
+ (function () {
18
+ 'use strict';
19
+
20
+ var API = '/api/bongos';
21
+
22
+ // ---- pure: what the line under the box says (node-testable) ----
23
+ function explain(res) {
24
+ var err = res && res.data && res.data.error;
25
+ var code = err && (typeof err === 'object' ? err.code : err);
26
+ var details = (err && typeof err === 'object' && err.details) || {};
27
+ if (details.reason) return 'Not filed: ' + details.reason + '. Your idea is still here.';
28
+ if (res && (res.status === 401 || res.status === 403)) return 'Not filed: your session may have expired. Reload and try again.';
29
+ if (code) return 'Not filed: ' + String(code).replace(/_/g, ' ') + '. Your idea is still here.';
30
+ return 'Not filed' + (res && res.status ? ' (' + res.status + ')' : '') + '. Nothing was saved; your idea is still here.';
31
+ }
32
+ // the first non-empty line is the title; whatever follows it is the details
33
+ function body(text) {
34
+ var lines = String(text || '').replace(/\r\n?/g, '\n').split('\n');
35
+ while (lines.length && !lines[0].trim()) lines.shift();
36
+ return { title: (lines.shift() || '').trim(), body_md: lines.join('\n').trim(), kind: 'feature' };
37
+ }
38
+ var Lib = { explain: explain, body: body };
39
+ if (typeof module !== 'undefined' && module.exports) module.exports = Lib;
40
+ if (typeof document === 'undefined') return;
41
+
42
+ function attach(host) {
43
+ var api = null, filing = false;
44
+ var root = document.createElement('form');
45
+ root.className = 'hib';
46
+ root.setAttribute('novalidate', '');
47
+ root.setAttribute('aria-labelledby', 'hib-h');
48
+ root.hidden = true;
49
+ root.innerHTML =
50
+ '<h2 class="hib-h" id="hib-h"><label for="hib-title">What is your idea?</label></h2>' +
51
+ '<div class="hib-row">' +
52
+ '<textarea id="hib-title" class="hib-title" rows="1" placeholder="One line is enough" aria-describedby="hib-keys"></textarea>' +
53
+ '<button type="submit" class="btn hib-file">File idea</button>' +
54
+ '</div>' +
55
+ '<p class="sr-only" id="hib-keys">Enter files the idea. Shift and Enter starts a new line.</p>' +
56
+ '<p class="hib-said" role="status" aria-live="polite"></p>';
57
+ host.insertBefore(root, host.firstChild);
58
+ var title = root.querySelector('.hib-title');
59
+ var said = root.querySelector('.hib-said'), btn = root.querySelector('.hib-file');
60
+
61
+ // the box is as tall as what is in it
62
+ function fit() { title.style.height = 'auto'; title.style.height = title.scrollHeight + 'px'; }
63
+ title.addEventListener('input', fit);
64
+ // Enter files, Shift+Enter is a new line; a key that is still composing a character is left alone
65
+ title.addEventListener('keydown', function (e) {
66
+ if (e.key !== 'Enter' || e.shiftKey || e.isComposing) return;
67
+ e.preventDefault();
68
+ if (typeof root.requestSubmit === 'function') root.requestSubmit(); else root.dispatchEvent(new Event('submit', { cancelable: true }));
69
+ });
70
+
71
+ function say(text, link) {
72
+ said.textContent = text;
73
+ said.classList.toggle('hib-said--err', !link && !!text);
74
+ if (link) {
75
+ var a = document.createElement('a');
76
+ a.href = '/thinking';
77
+ a.textContent = 'See it in Your thinking';
78
+ said.append(' ', a);
79
+ }
80
+ }
81
+
82
+ root.addEventListener('submit', function (e) {
83
+ e.preventDefault();
84
+ if (filing) return;
85
+ var b = body(title.value);
86
+ if (!b.title) { say('Type your idea first.'); title.focus(); return; }
87
+ api = api || (window.BongosClient && window.BongosClient.createClient({ baseUrl: '', credentials: 'same-origin', throwOnError: false }));
88
+ if (!api) { say(explain(null)); return; }
89
+ filing = true; btn.disabled = true; say('');
90
+ api.request('POST', API + '/inbox', { body: b }).catch(function () { return null; }).then(function (res) {
91
+ filing = false; btn.disabled = false;
92
+ if (!res || !res.ok || !res.data || !res.data.idea) { say(explain(res)); return; }
93
+ title.value = ''; fit();
94
+ say(res.data.routed_task ? 'Filed, and it is already a task.' : 'Filed. It waits for the next triage.', true);
95
+ title.focus();
96
+ });
97
+ });
98
+
99
+ return {
100
+ // shown in Ideating
101
+ show: function (on) { root.hidden = !on; },
102
+ };
103
+ }
104
+
105
+ window.OTBHomeIdeaBox = { attach: attach, lib: Lib };
106
+ })();
@@ -23,6 +23,7 @@
23
23
  <link rel="stylesheet" href="/builders/hall-ask.css">
24
24
  <link rel="stylesheet" href="/builders/home-city.css">
25
25
  <link rel="stylesheet" href="/builders/home-gallery.css">
26
+ <link rel="stylesheet" href="/builders/home-idea-box.css">
26
27
  </head>
27
28
  <body data-page="home">
28
29
 
@@ -133,6 +134,7 @@
133
134
  <script src="/builders/city-draw.js" defer></script>
134
135
  <script src="/builders/home-city-draw.js" defer></script>
135
136
  <script src="/builders/home-gallery.js" defer></script>
137
+ <script src="/builders/home-idea-box.js" defer></script>
136
138
  <script src="/builders/home-city.js" defer></script>
137
139
  <!-- task 1003455: the shared blocker-row renderer (window.OTBBlockersLib), read by
138
140
  both goal-inbox.js's attention-inbox slice below and the /blockers page.
@@ -212,6 +212,21 @@
212
212
  }
213
213
  .dp-settled .ps-controls { margin: 0.4rem 0 0.2rem; }
214
214
 
215
+ /* The box's plain status line (task 1005012): up to date, or not and here is the button.
216
+ The same left-mark grammar as the settled states — ok when nothing waits, the accent
217
+ when a published version is waiting for a person's press. */
218
+ .dp-status { margin: 0.4rem 0 0; }
219
+ .dp-status--ok {
220
+ border-left: 3px solid var(--ok);
221
+ padding-left: 0.7rem;
222
+ }
223
+ .dp-status--behind {
224
+ border-left: 3px solid var(--accent);
225
+ padding-left: 0.7rem;
226
+ }
227
+ .dp-status .ps-controls { margin: 0.5rem 0 0.3rem; }
228
+ .dp-status__note { color: var(--ink-soft); }
229
+
215
230
  /* The project's update rule (task 1004445) — a quiet setting under the move, set apart by
216
231
  a hairline so it does not read as part of whichever state sits above it. */
217
232
  .dp-rule {
@@ -175,6 +175,27 @@ leaderboard.
175
175
  - Pinned in `tests/home_studio.mjs` and `tests/home_studio_widget.mjs` (real browser, empty states included); harness
176
176
  fixtures `copy-desk__studio.json` and `home__studio__works.json`.
177
177
 
178
+ ## The idea box — the ideator's Home opens on it (task 1005078)
179
+
180
+ The owner's work-first hall (2026-11-04: "the hall is for doing work, not looking at stuff"), goal 1000095. In
181
+ Ideating, the first thing on Home is a place to type an idea and file it; the sky and the ladder stay under it.
182
+
183
+ - **One section, still.** `home-idea-box.js` is not a hall widget (Home's stats zone holds one): `home-city.js`
184
+ attaches it at the top of its section, the gallery's way, and `craftHome()` shows it in Ideating only. It shows
185
+ even when `GET /home/city` failed, because filing needs no picture of the other ideas.
186
+ - **One box and a button** (owner, 2026-11-05: "the idea submission should only have one box"). Enter files and
187
+ Shift+Enter starts a new line (owner, same day); the box grows with what is typed. The first non-empty line is
188
+ the title and any lines after it are `body_md`. No kind or goal picker: it files `kind: 'feature'` through
189
+ `POST /inbox`, the sky composer's quick filing, and triage routes it. The top bar's + idea button is unchanged.
190
+ - **What it says.** A refusal keeps the words and names the reason (`details.reason`, else the code); a filing
191
+ clears the box and links to Your thinking. It reads nothing.
192
+ - **The setup guide hides in Ideating** (`#welcome-scroll`, `home-idea-box.css`): it is about building on your
193
+ own machine and pushed the box below the fold. Every other craft still shows it.
194
+ - **Preview.** `scripts/hall-preview/server.js` answers `POST /inbox` with the canned `inbox.post.json`, so the
195
+ filed state can be seen. Pinned by `tests/home_idea_box.mjs` (8 cases, a real browser).
196
+ - **Sign-off.** The owner saw it in the preview at 1440 dark and said "Looks right, ship it" (2026-11-05), then
197
+ asked for Enter / Shift+Enter, which was added before the ship.
198
+
178
199
  ## The governor's Home is the street (task 1005064)
179
200
 
180
201
  The owner, 2026-11-04, after the four Homes went live: "when you tab between the pages the home screen
@@ -79,6 +79,28 @@ function askRequired(req, body) {
79
79
  return !TEMPLATED_SOURCES.includes(body.source);
80
80
  }
81
81
 
82
+ // CHECKED, NOT INFERRED (task 1005120). A blocker spends the owner's attention, the
83
+ // scarcest thing a project has. One project's blocker asked its owner to "apply to
84
+ // Plaid for OAuth" for days after the project's own shipped work found there was
85
+ // nothing to apply for: it had been filed on an inference (one bank worked, one did
86
+ // not) when the page that settled it was one click away. So the same filings that
87
+ // owe an ask (an AI session, by hand) also owe `checked` — one sentence naming what
88
+ // the session opened or ran that showed only a person can do this. It is written into
89
+ // the blocker's body, so whoever re-reads the blocker later (the daily review re-checks
90
+ // before asking again) can see what the claim rested on and test it against what has
91
+ // shipped since. The floor is a length, because a length is all a server can judge;
92
+ // it stops "probably needed", which is the shape the hunch takes.
93
+ const CHECKED_MIN = 30;
94
+ const CHECKED_REQUIRED_MESSAGE = 'An AI session files a blocker only after checking it really needs a person. '
95
+ + `Add "checked": one sentence (${CHECKED_MIN} characters or more) saying what you opened or ran that showed it, `
96
+ + 'for example the settings page you read or the command whose output you saw. If you have not checked, check first.';
97
+ // The line names WHO checked, so a blocker is tracked back to its filer — the person a
98
+ // re-check asks first — without a new column on the core-owned table.
99
+ function checkedLine(checked, builder) {
100
+ const who = builder && builder.github_login ? ` (by @${builder.github_login})` : '';
101
+ return `**Checked before filing${who}:** ${String(checked).trim()}`;
102
+ }
103
+
82
104
  // The `ideas.fileBlocker` port's writer: POST /blockers' shape and length rules, for a caller
83
105
  // inside the server, which has no request to validate. A refusal throws with code BAD_BLOCKER.
84
106
  function fileBlockerFromServer({ title, bodyMd = '', source, sourceRef } = {}) {
@@ -145,6 +167,8 @@ module.exports = function buildBlockersRouter() {
145
167
  // person answers (task 1004703, see THE ASK above); a slop ask files nothing
146
168
  // (400 `ask_refused`). An AI session filing by hand (a CLI session, any `source`
147
169
  // but a templated script's) must send one: without it, 400 `ask_required` (task 1004704).
170
+ // The same filing also sends `checked` — what it opened or ran that showed a person
171
+ // is needed — or 400 `checked_required`; it is appended to body_md (task 1005120).
148
172
  // → 201 { blocker, ask } (ask: the stored card, or null).
149
173
  router.post('/blockers', api.requireBuilder, async (req, res) => {
150
174
  if (validateOrRespond(req, res, {
@@ -153,6 +177,7 @@ module.exports = function buildBlockersRouter() {
153
177
  source: { type: 'string', maxLength: LIMITS.SOURCE },
154
178
  source_ref: { type: 'string', maxLength: LIMITS.SOURCE_REF },
155
179
  ask: { type: 'object' },
180
+ checked: { type: 'string', maxLength: LIMITS.TITLE },
156
181
  })) return;
157
182
  const body = req.body || {};
158
183
  let verdict = null;
@@ -177,10 +202,31 @@ module.exports = function buildBlockersRouter() {
177
202
  return res.fail('ask_refused', { status: 400, message: gov.refusalLine(verdict.errors), details: { errors: verdict.errors } });
178
203
  }
179
204
  }
205
+ // After the ask, so a filing with no card hears about the card first (task 1005120).
206
+ const checked = typeof body.checked === 'string' ? body.checked.trim() : '';
207
+ if (askRequired(req, body) && checked.length < CHECKED_MIN) {
208
+ return res.fail('checked_required', {
209
+ status: 400,
210
+ message: CHECKED_REQUIRED_MESSAGE,
211
+ details: { field: 'checked', min_length: CHECKED_MIN },
212
+ });
213
+ }
214
+ const bodyMd = checked
215
+ ? [String(body.body_md ?? '').trim(), checkedLine(checked, req.builder)].filter(Boolean).join('\n\n')
216
+ : (body.body_md ?? '');
217
+ // body_md was validated on its own; the check line is added after, so the whole is
218
+ // held to the same cap rather than quietly growing past it.
219
+ if (bodyMd.length > LIMITS.DESCRIPTION) {
220
+ return res.fail('body_too_long', {
221
+ status: 400,
222
+ message: `The blocker's text and its "checked" line come to ${bodyMd.length} characters; ${LIMITS.DESCRIPTION} at most. Shorten the body.`,
223
+ details: { field: 'body_md', max_length: LIMITS.DESCRIPTION },
224
+ });
225
+ }
180
226
  try {
181
227
  const blocker = await blockers.createBlocker({
182
228
  title: body.title,
183
- bodyMd: body.body_md ?? '',
229
+ bodyMd,
184
230
  source: body.source ?? 'manual',
185
231
  sourceRef: body.source_ref ?? null,
186
232
  });
package/package-lock.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@bongos/core",
3
- "version": "1.24.75",
3
+ "version": "1.24.76",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@bongos/core",
9
- "version": "1.24.75",
9
+ "version": "1.24.76",
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.24.75",
3
+ "version": "1.24.76",
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",
@@ -11470,7 +11470,19 @@
11470
11470
  "text": "The hall has a game mode: once it is on, every page opens full screen with no sidebar, and Escape brings the menus back when you need them."
11471
11471
  }
11472
11472
  ],
11473
- "1.24.75": [
11473
+ "1.24.76": [
11474
+ {
11475
+ "id": "1005078",
11476
+ "text": "In Ideating mode, Home now opens on a single box to type and file an idea — press Enter to file it, Shift+Enter for a new line."
11477
+ },
11478
+ {
11479
+ "id": "1005120",
11480
+ "text": "Blockers now cost a real check to file: an AI session must say what it looked at that showed a person is needed, and that note stays on the blocker. The daily blocker review now re-checks each one against what has shipped sinc"
11481
+ },
11482
+ {
11483
+ "id": "1005012",
11484
+ "text": "The Deploy page now says in one plain line whether the project is up to date. When it is, it says merged work in that version is live and that the next version arrives on its own (or waits, if the project is set to stay put)."
11485
+ },
11474
11486
  {
11475
11487
  "id": "1005121",
11476
11488
  "text": "Closing a project-setup stage is now one step: if the founder alone decides, the stage closes and the project moves on at once; if others must vote, the answer says who and what to do next instead of falsely reporting success."
@@ -0,0 +1,111 @@
1
+ #!/usr/bin/env node
2
+ // scripts/bongos/blocker-recheck.js — what has shipped since a blocker was filed that may
3
+ // already answer it (task 1005120).
4
+ //
5
+ // WHY. A blocker is a claim about the world, made on a date, by a session that has long
6
+ // since ended. One project's blocker asked its owner to "apply to Plaid for Chase and Bank of
7
+ // America OAuth" for days after the project's own shipped work had found there was nothing
8
+ // to apply for — nothing ever re-read it, and it had no linked tasks, so no promotion would
9
+ // ever surface it. /blocker-review runs this before putting a blocker to a person again: it
10
+ // lists the shipped work since the filing that shares the blocker's subject, so the session
11
+ // reads that first and offers to close the blocker when the answer is already in.
12
+ //
13
+ // IT SUGGESTS, IT NEVER DECIDES. A word overlap is a reason to read a task, not proof the
14
+ // blocker is answered; closing one is still a person's verdict in the review. So the match is
15
+ // deliberately simple and explainable (shared subject words, each shown), never a score a
16
+ // reader has to trust.
17
+ //
18
+ // usage: node scripts/bongos/blocker-recheck.js <blocker-id> [--json]
19
+
20
+ 'use strict';
21
+
22
+ // Words that say nothing about a blocker's SUBJECT. Short words are dropped by length.
23
+ const STOP = new Set([
24
+ 'about', 'after', 'again', 'already', 'also', 'apply', 'because', 'before', 'being', 'blocker',
25
+ 'cannot', 'could', 'does', 'done', 'each', 'from', 'have', 'into', 'just', 'make', 'more', 'must',
26
+ 'need', 'needs', 'only', 'other', 'owner', 'should', 'some', 'still', 'than', 'that', 'their',
27
+ 'them', 'then', 'there', 'these', 'they', 'this', 'those', 'through', 'until', 'very', 'want',
28
+ 'were', 'what', 'when', 'where', 'which', 'while', 'will', 'with', 'without', 'would', 'your',
29
+ 'task', 'tasks', 'work', 'page', 'pages', 'project',
30
+ // Words nearly every shipped summary in this ledger carries, so they say nothing about a
31
+ // blocker's subject (measured against a live blocker: these alone matched ten tasks).
32
+ 'back', 'both', 'check', 'checks', 'core', 'main', 'once', 'open', 'itself', 'shipped', 'test',
33
+ 'tests', 'version', 'versions', 'instance', 'server', 'update', 'copy', 'first', 'every', 'now',
34
+ ]);
35
+
36
+ /** The subject words of a text: lower-cased, 4+ letters, not a stop word. */
37
+ function subjectWords(text) {
38
+ const out = new Set();
39
+ for (const w of String(text || '').toLowerCase().match(/[a-z][a-z0-9]{3,}/g) || []) {
40
+ if (!STOP.has(w)) out.add(w);
41
+ }
42
+ return out;
43
+ }
44
+
45
+ /**
46
+ * Shipped tasks AFTER the blocker was filed that share at least `minShared` subject words
47
+ * with its title + body, most shared first, then newest. PURE.
48
+ * Each result: { id, short_name, title, shipped_at, value_summary, shared: [words] }.
49
+ */
50
+ function relatedShipped(blocker, tasks, { minShared = 2, max = 10 } = {}) {
51
+ const filed = Date.parse(blocker && blocker.created_at);
52
+ if (!Number.isFinite(filed)) return [];
53
+ // The TITLE names the subject; a long body mostly carries generic words that match
54
+ // everything. The body is used only when the title alone is too thin to match on.
55
+ let want = subjectWords(blocker.title);
56
+ if (want.size < minShared) want = subjectWords(`${blocker.title || ''} ${blocker.body_md || ''}`);
57
+ const hits = [];
58
+ for (const t of Array.isArray(tasks) ? tasks : []) {
59
+ if (!t || t.status !== 'shipped') continue;
60
+ const at = Date.parse(t.shipped_at);
61
+ if (!Number.isFinite(at) || at <= filed) continue;
62
+ const have = subjectWords(`${t.title || ''} ${t.value_summary || ''}`);
63
+ const shared = [...want].filter((w) => have.has(w)).sort();
64
+ if (shared.length >= minShared) {
65
+ hits.push({ id: t.id, short_name: t.short_name || null, title: t.title, shipped_at: t.shipped_at, value_summary: t.value_summary || null, shared });
66
+ }
67
+ }
68
+ hits.sort((a, b) => (b.shared.length - a.shared.length) || (Date.parse(b.shipped_at) - Date.parse(a.shipped_at)));
69
+ return hits.slice(0, max);
70
+ }
71
+
72
+ /** The lines /blocker-review reads. Never "nothing is related" as proof the blocker holds. */
73
+ function reportLines(blocker, hits) {
74
+ const head = `Blocker ${blocker.id} - "${blocker.title}" (filed ${String(blocker.created_at).slice(0, 10)})`;
75
+ if (!hits.length) {
76
+ return [head, ' No shipped work since it was filed shares its subject. That is not proof it still holds: re-run the check it names, if any.'];
77
+ }
78
+ return [head, ` ${hits.length} shipped since it was filed may answer it — read these before asking again:`,
79
+ ...hits.map((h) => ` - task ${h.id}${h.short_name ? ` - ${h.short_name}` : ''} (shipped ${String(h.shipped_at).slice(0, 10)}; shares: ${h.shared.join(', ')})${h.value_summary ? `\n ${h.value_summary}` : ''}`)];
80
+ }
81
+
82
+ async function main(argv) {
83
+ const id = Number(argv[0]);
84
+ if (!Number.isInteger(id) || id <= 0) {
85
+ console.error('usage: node scripts/bongos/blocker-recheck.js <blocker-id> [--json]');
86
+ return 2;
87
+ }
88
+ const { cliClient } = require('./cli-lib');
89
+ const api = await cliClient();
90
+ const b = await api.request('GET', `/blockers/${id}`);
91
+ if (!b.ok || !b.data || !b.data.blocker) {
92
+ console.error(`blocker ${id}: could not be read (${b.status})`);
93
+ return 1;
94
+ }
95
+ const t = await api.request('GET', '/tasks?status=shipped&limit=1000');
96
+ if (!t.ok) {
97
+ console.error(`shipped tasks could not be read (${t.status}), so nothing was re-checked`);
98
+ return 1;
99
+ }
100
+ const tasks = Array.isArray(t.data) ? t.data : (t.data && t.data.tasks) || [];
101
+ const hits = relatedShipped(b.data.blocker, tasks);
102
+ if (argv.includes('--json')) console.log(JSON.stringify({ blocker_id: id, related: hits }, null, 2));
103
+ else console.log(reportLines(b.data.blocker, hits).join('\n'));
104
+ return 0;
105
+ }
106
+
107
+ module.exports = { subjectWords, relatedShipped, reportLines };
108
+
109
+ if (require.main === module) {
110
+ main(process.argv.slice(2)).then((code) => { process.exitCode = code; }, (e) => { console.error(e.message); process.exitCode = 1; });
111
+ }
@@ -1267,7 +1267,7 @@ async function walkNewMachinery({ call, code, vote, voteAll, check, section, sta
1267
1267
  });
1268
1268
  let matter = null;
1269
1269
  await check('With an ask, the AI session\'s blocker is filed and carries its card', '201; the blocker reads back with its question', async () => {
1270
- const r = await call(CY, 'POST', '/blockers', { title: 'Walk needs a decision', ask: GOOD_ASK }, 'cli');
1270
+ const r = await call(CY, 'POST', '/blockers', { title: 'Walk needs a decision', ask: GOOD_ASK, checked: 'Ran the walk against the stub server and read its refusal for this exact card.' }, 'cli');
1271
1271
  const id = r.json && r.json.blocker && r.json.blocker.id;
1272
1272
  matter = id ? `blockers:${id}` : null;
1273
1273
  const back = await call(CY, 'GET', `/blockers/${id}`);
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+ // scripts/gds/blocker-recheck.js — @bongos-forwarder (task 1004848). Generated by
3
+ // scripts/bongos/codemod-rename-scripts-gds.js; do not edit.
4
+ // The real script is scripts/bongos/blocker-recheck.js. This forwarder keeps callers that still name
5
+ // the old path working, and warns once so they get repointed. Task 1003706 removes it.
6
+ 'use strict';
7
+ require('../bongos/forwarder.js').forward(module, 'blocker-recheck.js');
@@ -182,6 +182,7 @@ const FIXTURE_FALLBACKS = [
182
182
  // and changes nothing: the harness has no state to change, and the page reads
183
183
  // the same fixtures again on reload. Anything absent is still refused.
184
184
  const CANNED_WRITES = [
185
+ ['POST', /^inbox$/, 'inbox.post'],
185
186
  ['PUT', /^copy-desk\/pages\/[a-z0-9-]+:[a-z0-9-]+\/draft$/, 'copy-desk__pages__draft.put'],
186
187
  ['POST', /^copy-desk\/pages\/[a-z0-9-]+:[a-z0-9-]+\/submit$/, 'copy-desk__pages__submit.post'],
187
188
  ['POST', /^copy-desk\/pages\/[a-z0-9-]+:[a-z0-9-]+\/claim$/, 'copy-desk__pages__claim.post'],
package/src/module-api.js CHANGED
@@ -81,7 +81,7 @@ const { sleep } = require('./sleep');
81
81
  // MAJOR (see allowBoxScope below): passes the request through untouched.
82
82
  function deprecatedNoopMiddleware(_req, _res, next) { next(); }
83
83
 
84
- const CORE_VERSION = '1.24.75'; // CI auto-patch carrier (ADR 0161); changelog: docs/module-api-changelog.md
84
+ const CORE_VERSION = '1.24.76'; // CI auto-patch carrier (ADR 0161); changelog: docs/module-api-changelog.md
85
85
 
86
86
  // A namespaced logger so a module's log lines are attributable + consistent.
87
87
  // Usage: const log = api.logger('discord'); log.info('mounted');