@unson/brainbase-mcp 0.49.1 → 0.50.1
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/contracts/brainbase-public-contract.v1.json +288 -0
- package/contracts/judgment-dag/digest.json +3 -3
- package/contracts/judgment-dag/source-lock.json +1 -1
- package/dist/meeting-minutes-http.js +35 -5
- package/dist/meeting-minutes-storage-http.js +33 -4
- package/dist/meeting-minutes.d.ts +31 -0
- package/dist/meeting-minutes.js +71 -1
- package/dist/meeting-source-connection.d.ts +33 -1
- package/dist/meeting-source-connection.js +124 -1
- package/dist/meeting-source-reader.d.ts +9 -0
- package/dist/meeting-source-reader.js +10 -3
- package/dist/ownership-survey.d.ts +28 -0
- package/dist/ownership-survey.js +60 -0
- package/dist/queue-task-tools.d.ts +114 -0
- package/dist/queue-task-tools.js +263 -0
- package/dist/testing/queue-task-reference-backend.d.ts +43 -0
- package/dist/testing/queue-task-reference-backend.js +157 -0
- package/dist/testing/queue-task-tools-contract.d.ts +33 -0
- package/dist/testing/queue-task-tools-contract.js +487 -0
- package/docs/architecture/judgment-dag-core.md +13 -8
- package/package.json +21 -5
- package/ui/judgment-history.js +0 -15
- package/ui/meeting-minutes.js +18 -5
- package/ui/world/world-canvas-ui.js +25 -5
- package/ui/world/world-view.css +58 -0
- package/ui/world/world-view.js +43 -14
package/ui/meeting-minutes.js
CHANGED
|
@@ -1931,7 +1931,7 @@ export function createMeetingMinutesUI({
|
|
|
1931
1931
|
title: title.input.value,
|
|
1932
1932
|
...(scheduledAt ? { scheduled_at: scheduledAt } : {}),
|
|
1933
1933
|
participant_ids: participants.input.value.split(',').map((value) => value.trim()).filter(Boolean),
|
|
1934
|
-
minutes_title: minutesTitle.input.value,
|
|
1934
|
+
...(minutesTitle.input.value.trim() ? { minutes_title: minutesTitle.input.value } : {}),
|
|
1935
1935
|
initial_body: body.input.value,
|
|
1936
1936
|
};
|
|
1937
1937
|
const created = typeof createMeeting === 'function' && Array.isArray(projectOptions) ? await createMeeting(payload, projectCode) : await mutate('', payload);
|
|
@@ -1956,10 +1956,23 @@ export function createMeetingMinutesUI({
|
|
|
1956
1956
|
state.loading = true;
|
|
1957
1957
|
if (!quiet) setStatus('会議一覧を読み込んでいます。');
|
|
1958
1958
|
try {
|
|
1959
|
-
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
|
-
|
|
1959
|
+
// The list carries no version body and the host caps each page, so even a long
|
|
1960
|
+
// history reads as a run of small responses instead of one large one. The cursor
|
|
1961
|
+
// walks the append-only meetings to the end and every page is gathered, so the
|
|
1962
|
+
// screen still shows every meeting (UNS-264). The first page keeps the bare path
|
|
1963
|
+
// so a host without paging keeps answering the single request it always has.
|
|
1964
|
+
const collected = [];
|
|
1965
|
+
let cursor = null;
|
|
1966
|
+
for (let page = 0; ; page += 1) {
|
|
1967
|
+
const payload = await call(cursor === null ? '' : `?cursor=${encodeURIComponent(cursor)}`);
|
|
1968
|
+
if (!isCurrentRequest()) return state.meetings;
|
|
1969
|
+
if (!isRecord(payload) || !Array.isArray(payload.meetings) || payload.absence_confirmed !== true) throw new Error('会議一覧の形式を確認できません。');
|
|
1970
|
+
for (const entry of payload.meetings) collected.push(entry);
|
|
1971
|
+
const next = typeof payload.next_cursor === 'string' ? payload.next_cursor.trim() : '';
|
|
1972
|
+
if (!next || next === cursor || page >= 10000) break;
|
|
1973
|
+
cursor = next;
|
|
1974
|
+
}
|
|
1975
|
+
state.meetings = sortMeetings(collected);
|
|
1963
1976
|
state.listError = null;
|
|
1964
1977
|
const selectedMeetingStillListed = state.meetingId !== null
|
|
1965
1978
|
&& state.meetings.some((entry) => entry?.meeting?.meeting_id === state.meetingId);
|
|
@@ -7,12 +7,33 @@
|
|
|
7
7
|
|
|
8
8
|
import { workspaceNotificationCard } from '../../workspace-kit.js';
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
// Shared so the standard presentation can reuse the same sky artwork and labels
|
|
11
|
+
// (RQ-152). The icons are fixed code, never host data.
|
|
12
|
+
export const SKY_MODES = Object.freeze([
|
|
11
13
|
{ value: 'auto', label: '自動(現在時刻)', icon: '<circle cx="12" cy="12" r="8.5"/><path d="M12 7.5v5l3 1.8"/>' },
|
|
12
14
|
{ value: 'day', label: '昼', icon: '<circle cx="12" cy="12" r="5" fill="currentColor" fill-opacity=".12"/><path d="M12 2v2m0 16v2M2 12h2m16 0h2M4.9 4.9l1.4 1.4m11.4 11.4 1.4 1.4M4.9 19.1l1.4-1.4M17.7 6.3l1.4-1.4"/><path d="M10 12h.01M14 12h.01m-4 2.5q2 1.6 4 0"/>' },
|
|
13
15
|
{ value: 'dusk', label: '夕方', icon: '<path d="M5.5 13a6.5 6.5 0 0 1 13 0" fill="currentColor" fill-opacity=".12"/><path d="M12 2v2M3.5 5.5 5 7m15.5-1.5L19 7M2 13h20M3 17q3-2 6 0t6 0 6 0M6 21q3-2 6 0t6 0"/>' },
|
|
14
16
|
{ value: 'night', label: '夜', icon: '<path d="M19.5 15.5A8.5 8.5 0 0 1 8.5 4.5a8.5 8.5 0 1 0 11 11Z" fill="currentColor" fill-opacity=".12"/><path d="m18 3 .7 2.3L21 6l-2.3.7L18 9l-.7-2.3L15 6l2.3-.7ZM22 11h.01"/>' },
|
|
15
17
|
]);
|
|
18
|
+
|
|
19
|
+
/** The sky mode after `mode`, cycling in the listed order. */
|
|
20
|
+
export function nextSkyMode(mode) {
|
|
21
|
+
const index = SKY_MODES.findIndex((entry) => entry.value === mode);
|
|
22
|
+
return SKY_MODES[(Math.max(0, index) + 1) % SKY_MODES.length];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** "空:{現在}。次は{次}" — the single sky-control label, used in both presentations. */
|
|
26
|
+
export function skyModeLabel(mode) {
|
|
27
|
+
const match = SKY_MODES.find((entry) => entry.value === mode) ?? SKY_MODES[0];
|
|
28
|
+
return `空:${match.label}。次は${nextSkyMode(match.value).label}`;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/** The fixed-artwork SVG for a sky mode, as inner HTML for an aria-hidden icon span. */
|
|
32
|
+
export function skyModeIconSvg(mode) {
|
|
33
|
+
const match = SKY_MODES.find((entry) => entry.value === mode) ?? SKY_MODES[0];
|
|
34
|
+
return `<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.7" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${match.icon}</svg>`;
|
|
35
|
+
}
|
|
36
|
+
|
|
16
37
|
const CLOSE_DELAY = 220;
|
|
17
38
|
let instanceId = 0;
|
|
18
39
|
|
|
@@ -221,9 +242,8 @@ export function createWorldCanvasUI({
|
|
|
221
242
|
if (!match) return;
|
|
222
243
|
skyMode = mode;
|
|
223
244
|
// Artwork is fixed code, never host data. Native button activation covers Enter/Space.
|
|
224
|
-
skyIcon.innerHTML =
|
|
225
|
-
const
|
|
226
|
-
const label = `空:${match.label}。次は${next.label}`;
|
|
245
|
+
skyIcon.innerHTML = skyModeIconSvg(mode);
|
|
246
|
+
const label = skyModeLabel(mode);
|
|
227
247
|
sky.setAttribute('aria-label', label);
|
|
228
248
|
sky.setAttribute('title', label);
|
|
229
249
|
}
|
|
@@ -411,7 +431,7 @@ export function createWorldCanvasUI({
|
|
|
411
431
|
});
|
|
412
432
|
listen(city, 'change', () => { if (businesses.has(city.value)) onCity?.(city.value); });
|
|
413
433
|
listen(sky, 'click', () => {
|
|
414
|
-
const next =
|
|
434
|
+
const next = nextSkyMode(skyMode);
|
|
415
435
|
setSky(next.value);
|
|
416
436
|
onSky?.(next.value);
|
|
417
437
|
});
|
package/ui/world/world-view.css
CHANGED
|
@@ -357,6 +357,64 @@
|
|
|
357
357
|
display: none;
|
|
358
358
|
}
|
|
359
359
|
|
|
360
|
+
/* RQ-003: the "?" disclosure and its panel sit above the canvas. The stage's
|
|
361
|
+
first child canvas fills its height and the stage clips overflow, so these
|
|
362
|
+
must be absolutely positioned to stay visible and clickable (not in flow). */
|
|
363
|
+
.bb-world-legend-toggle {
|
|
364
|
+
position: absolute;
|
|
365
|
+
top: var(--bb-space-3);
|
|
366
|
+
right: var(--bb-space-3);
|
|
367
|
+
z-index: 3;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
.bb-world-legend-panel {
|
|
371
|
+
position: absolute;
|
|
372
|
+
top: calc(var(--bb-space-3) + 42px);
|
|
373
|
+
right: var(--bb-space-3);
|
|
374
|
+
z-index: 3;
|
|
375
|
+
max-width: min(360px, calc(100% - 24px));
|
|
376
|
+
max-height: calc(100% - 80px);
|
|
377
|
+
overflow: auto;
|
|
378
|
+
display: flex;
|
|
379
|
+
flex-direction: column;
|
|
380
|
+
gap: var(--bb-space-2);
|
|
381
|
+
padding: var(--bb-space-3);
|
|
382
|
+
background: rgb(255 255 255 / 95%);
|
|
383
|
+
border: 1px solid var(--bb-color-border);
|
|
384
|
+
border-radius: var(--bb-radius-md);
|
|
385
|
+
box-shadow: var(--bb-shadow);
|
|
386
|
+
backdrop-filter: blur(4px);
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
.bb-world-legend-panel[hidden] {
|
|
390
|
+
display: none;
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
/* Inside the panel the legend is static, not an overlay pinned to the stage. */
|
|
394
|
+
.bb-world-legend-panel .bb-world-legend {
|
|
395
|
+
position: static;
|
|
396
|
+
inset: auto;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
/* RQ-006: the header sky switch is an icon button. The icon reuses the canvas
|
|
400
|
+
artwork, so its SVG needs the same explicit size or it would balloon and
|
|
401
|
+
break the header (the canvas rule only targets .bb-world-canvas-sky-icon). */
|
|
402
|
+
.bb-world-sky {
|
|
403
|
+
display: inline-grid;
|
|
404
|
+
place-items: center;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
.bb-world-sky-icon {
|
|
408
|
+
display: inline-flex;
|
|
409
|
+
line-height: 1;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
.bb-world-sky-icon svg {
|
|
413
|
+
display: block;
|
|
414
|
+
width: 23px;
|
|
415
|
+
height: 23px;
|
|
416
|
+
}
|
|
417
|
+
|
|
360
418
|
.bb-world-chip.is-work-waiting::before { background: #7a6a9e; }
|
|
361
419
|
.bb-world-chip.is-work-in_progress::before { background: #2f7d86; }
|
|
362
420
|
.bb-world-chip.is-work-pending::before { background: #8d979e; }
|
package/ui/world/world-view.js
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
import { THREE, MapControls } from './world-vendor.js';
|
|
30
30
|
import { changesSince, cityMeasures, districtChanges, districtLots, districtSnapshot, districtStage, groupJudgmentPlaces, skyAt, UNPLACED_REASON_TEXT } from './world-placement.js';
|
|
31
31
|
import { createDistrictView, DISTRICT_LEGEND } from './world-district.js';
|
|
32
|
-
import { createWorldCanvasUI } from './world-canvas-ui.js';
|
|
32
|
+
import { createWorldCanvasUI, SKY_MODES, skyModeLabel, skyModeIconSvg } from './world-canvas-ui.js';
|
|
33
33
|
import { workCanvasNotes } from './world-canvas-notes.js';
|
|
34
34
|
import { canvasTexture, drawFacade, FACADE_SIZES, FACADE_UNITS, gableRoof, hashUnit, muted, paintVertices, roundedPlate, valueNoise } from './world-scenery.js';
|
|
35
35
|
import { WORK_STATES, readReasonShort, workCityBlocks, workGrowthBlock, workPickBlock, workSign, workSignBlocks, workSigns, workSiteBlocks } from './world-work-rail.js';
|
|
@@ -44,6 +44,8 @@ import {
|
|
|
44
44
|
workspaceButton,
|
|
45
45
|
} from '../../workspace-kit.js';
|
|
46
46
|
|
|
47
|
+
let worldLegendSequence = 0;
|
|
48
|
+
|
|
47
49
|
export const WORLD_VIEW_CONTRACT_VERSION = 'brainbase.world-view.v0';
|
|
48
50
|
/** Optional full-canvas presentation; the standard host contract remains unchanged. */
|
|
49
51
|
export const WORLD_CANVAS_PRESENTATION_VERSION = 'brainbase.world-canvas.v1';
|
|
@@ -1650,17 +1652,28 @@ export function createWorldView({ root, rail, page, presentation = 'standard', d
|
|
|
1650
1652
|
let scene = null;
|
|
1651
1653
|
|
|
1652
1654
|
// The sky follows the hour by default; the viewer can fix it to see the lit windows at night.
|
|
1653
|
-
|
|
1655
|
+
// An icon button reusing the canvas sky artwork and labels, so both presentations behave alike (RQ-152).
|
|
1654
1656
|
let skyIndex = 0;
|
|
1655
1657
|
const skyButton = workspaceButton(doc, {
|
|
1656
|
-
|
|
1658
|
+
variant: 'quiet',
|
|
1657
1659
|
onClick: () => {
|
|
1658
1660
|
skyIndex = (skyIndex + 1) % SKY_MODES.length;
|
|
1659
|
-
|
|
1660
|
-
scene?.setSky(SKY_MODES[skyIndex]
|
|
1661
|
-
district?.setSky(SKY_MODES[skyIndex]
|
|
1661
|
+
renderSkyButton();
|
|
1662
|
+
scene?.setSky(SKY_MODES[skyIndex].value);
|
|
1663
|
+
district?.setSky(SKY_MODES[skyIndex].value);
|
|
1662
1664
|
},
|
|
1663
1665
|
});
|
|
1666
|
+
skyButton.classList.add('bb-world-sky');
|
|
1667
|
+
const skyButtonIcon = el(doc, 'span', { className: 'bb-world-sky-icon', attrs: { 'aria-hidden': 'true' } });
|
|
1668
|
+
skyButton.append(skyButtonIcon);
|
|
1669
|
+
function renderSkyButton() {
|
|
1670
|
+
const mode = SKY_MODES[skyIndex].value;
|
|
1671
|
+
skyButtonIcon.innerHTML = skyModeIconSvg(mode);
|
|
1672
|
+
const label = skyModeLabel(mode);
|
|
1673
|
+
skyButton.setAttribute('aria-label', label);
|
|
1674
|
+
skyButton.setAttribute('title', label);
|
|
1675
|
+
}
|
|
1676
|
+
renderSkyButton();
|
|
1664
1677
|
const header = workspacePageHeader(doc, {
|
|
1665
1678
|
crumbs: page?.crumbs ?? ['あなたのBrainbase', '世界'],
|
|
1666
1679
|
title: '世界',
|
|
@@ -1711,9 +1724,10 @@ export function createWorldView({ root, rail, page, presentation = 'standard', d
|
|
|
1711
1724
|
if (business) openCity(business, scene?.selectKey({ code })?.center ?? null);
|
|
1712
1725
|
},
|
|
1713
1726
|
onSky: (mode) => {
|
|
1714
|
-
skyIndex = Math.max(0, SKY_MODES.findIndex((
|
|
1715
|
-
|
|
1716
|
-
|
|
1727
|
+
skyIndex = Math.max(0, SKY_MODES.findIndex((entry) => entry.value === mode));
|
|
1728
|
+
renderSkyButton();
|
|
1729
|
+
scene?.setSky(SKY_MODES[skyIndex].value);
|
|
1730
|
+
district?.setSky(SKY_MODES[skyIndex].value);
|
|
1717
1731
|
},
|
|
1718
1732
|
onDismissTask: () => dismissTask(),
|
|
1719
1733
|
});
|
|
@@ -1728,7 +1742,24 @@ export function createWorldView({ root, rail, page, presentation = 'standard', d
|
|
|
1728
1742
|
if (page?.source) help.append(el(doc, 'p', { text: page.source }));
|
|
1729
1743
|
canvasUI.setHelp([help]);
|
|
1730
1744
|
} else {
|
|
1731
|
-
|
|
1745
|
+
// The legend is no longer a permanent overlay (RQ-003); it folds into a small
|
|
1746
|
+
// "?" disclosure, closed by default, with the same keyboard and aria-expanded
|
|
1747
|
+
// behaviour as the canvas help button. The information is kept, just tucked away.
|
|
1748
|
+
const legendPanel = el(doc, 'div', { className: 'bb-world-legend-panel', attrs: { id: `bb-world-legend-${++worldLegendSequence}` } });
|
|
1749
|
+
legendPanel.hidden = true;
|
|
1750
|
+
legendPanel.append(legend, workLegend);
|
|
1751
|
+
const legendToggle = workspaceButton(doc, {
|
|
1752
|
+
text: '?',
|
|
1753
|
+
variant: 'quiet',
|
|
1754
|
+
attrs: { 'aria-label': '世界の見方と凡例', title: '世界の見方と凡例', 'aria-controls': legendPanel.id, 'aria-expanded': 'false' },
|
|
1755
|
+
onClick: () => {
|
|
1756
|
+
const open = legendPanel.hidden;
|
|
1757
|
+
legendPanel.hidden = !open;
|
|
1758
|
+
legendToggle.setAttribute('aria-expanded', String(open));
|
|
1759
|
+
},
|
|
1760
|
+
});
|
|
1761
|
+
legendToggle.classList.add('bb-world-legend-toggle');
|
|
1762
|
+
stage.append(notices, legendToggle, legendPanel);
|
|
1732
1763
|
wrap.append(header, stage);
|
|
1733
1764
|
}
|
|
1734
1765
|
|
|
@@ -2207,9 +2238,8 @@ export function createWorldView({ root, rail, page, presentation = 'standard', d
|
|
|
2207
2238
|
},
|
|
2208
2239
|
} : {}),
|
|
2209
2240
|
});
|
|
2210
|
-
district.setSky(SKY_MODES[skyIndex]
|
|
2241
|
+
district.setSky(SKY_MODES[skyIndex].value);
|
|
2211
2242
|
scene.setPaused(true);
|
|
2212
|
-
if (!canvasMode) { legend.hidden = true; workLegend.hidden = true; }
|
|
2213
2243
|
if (districtCode !== business.code || !district.isOpen()) {
|
|
2214
2244
|
district.show(business, work, { neighbours: new Map(knownBusinesses.map((entry) => [entry.code, entry.name])), exits: stationsFor(business.code) });
|
|
2215
2245
|
districtCode = business.code;
|
|
@@ -2225,7 +2255,6 @@ export function createWorldView({ root, rail, page, presentation = 'standard', d
|
|
|
2225
2255
|
district.hide();
|
|
2226
2256
|
districtCode = null;
|
|
2227
2257
|
scene?.setPaused(false);
|
|
2228
|
-
if (!canvasMode) legend.hidden = false;
|
|
2229
2258
|
}
|
|
2230
2259
|
|
|
2231
2260
|
async function loadWork(business) {
|
|
@@ -2670,7 +2699,7 @@ export function createWorldView({ root, rail, page, presentation = 'standard', d
|
|
|
2670
2699
|
return;
|
|
2671
2700
|
}
|
|
2672
2701
|
scene = createScene({ doc, stage, labelsLayer, reducedMotion, onPick, onClear: clearAll, onEscape: goUp, onSign: (business, code) => showSignMeaning(business ?? knownBusinesses.find((entry) => entry.code === code) ?? null) });
|
|
2673
|
-
scene.setSky(SKY_MODES[skyIndex]
|
|
2702
|
+
scene.setSky(SKY_MODES[skyIndex].value);
|
|
2674
2703
|
scene.buildPlaza(rows, rowItems, (row) => (rowItems.get(row.key) ?? []).filter((ref) => isWaiting(proofs.get(ref.decision_attempt_id))).length, Date.now(), { state: judgmentsUnavailable ? judgmentsUnavailable.title.replace('判断の記録:', '') : null });
|
|
2675
2704
|
scene.buildCities(layoutWorld(businesses), placement.byBusiness);
|
|
2676
2705
|
showChangesSinceLastVisit(note, businesses, rows);
|