@unson/brainbase-mcp 0.50.29 → 0.50.31
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 +1 -0
- package/dist/antigravity-judgment-hook.d.ts +191 -0
- package/dist/antigravity-judgment-hook.js +2042 -0
- package/dist/claude-code-judgment-hook.d.ts +23 -0
- package/dist/claude-code-judgment-hook.js +8 -5
- package/dist/cli.js +273 -6
- package/dist/graph-retrieval.d.ts +4 -0
- package/dist/graph-retrieval.js +4 -0
- package/dist/judgment-event-adapter.d.ts +37 -2
- package/dist/judgment-event-adapter.js +88 -3
- package/dist/judgment-event-outbox.d.ts +9 -1
- package/dist/judgment-event-outbox.js +45 -8
- package/dist/judgment-execution-outcome.d.ts +2 -1
- package/dist/judgment-execution-outcome.js +2 -1
- package/dist/judgment-frame.d.ts +26 -4
- package/dist/judgment-frame.js +190 -15
- package/dist/judgment-host.d.ts +30 -0
- package/dist/judgment-host.js +170 -22
- package/dist/judgment-model-outcome.d.ts +29 -1
- package/dist/judgment-model-outcome.js +69 -1
- package/dist/judgment-offline-binary-audit.d.ts +360 -0
- package/dist/judgment-offline-binary-audit.js +555 -0
- package/dist/judgment-project-binding.d.ts +1 -1
- package/dist/judgment-project-binding.js +2 -1
- package/dist/judgment-reasoning-audit.d.ts +115 -0
- package/dist/judgment-reasoning-audit.js +623 -0
- package/dist/judgment-reasoning-gate-prompt.d.ts +42 -0
- package/dist/judgment-reasoning-gate-prompt.js +83 -0
- package/dist/judgment-runtime-resolution.d.ts +2 -2
- package/dist/judgment-runtime-resolution.js +2 -2
- package/dist/judgment-runtime-resolution.public.d.ts +2 -2
- package/dist/judgment-session-world-model.d.ts +163 -0
- package/dist/judgment-session-world-model.js +408 -0
- package/dist/organization-graph.js +9 -1
- package/dist/remote-judgment-hook-http.d.ts +36 -3
- package/dist/remote-judgment-hook-http.js +94 -15
- package/package.json +10 -2
- package/ui/README.md +31 -0
- package/ui/graph-own-share.js +106 -50
- package/ui/graph-projects-view.js +4 -4
- package/ui/graph-view-shared.css +3 -0
- package/ui/workspace-kit.css +141 -0
- package/ui/workspace-kit.js +50 -1
- package/ui/world/world-view.js +1 -1
package/ui/workspace-kit.js
CHANGED
|
@@ -485,10 +485,11 @@ function nextWorkspaceSequence() {
|
|
|
485
485
|
const workspaceHelpDismissers = new WeakMap();
|
|
486
486
|
|
|
487
487
|
/** Shared explanatory help: hover/focus above the control, click for touch. */
|
|
488
|
-
export function workspaceHelp(doc, { text, label, content, icon = 'i', placement } = {}) {
|
|
488
|
+
export function workspaceHelp(doc, { text, label, content, icon = 'i', placement, appearance } = {}) {
|
|
489
489
|
const wrap = el(doc, content === undefined ? 'span' : 'div', { className: 'bb-ws-help' });
|
|
490
490
|
const control = workspaceButton(doc, { text: icon, attrs: { 'aria-label': `${label}の説明`, 'aria-expanded': 'false' } });
|
|
491
491
|
control.className = 'bb-ws-help-button';
|
|
492
|
+
if (appearance === 'toolbar') { toggleWorkspaceClass(wrap, 'bb-ws-help--toolbar', true); control.textContent = ''; control.append(workspaceActionIcon(doc, 'help')); }
|
|
492
493
|
const bubble = el(doc, content === undefined ? 'span' : 'div', { className: 'bb-ws-help-bubble', text, attrs: { id: `bb-ws-help-${nextWorkspaceSequence()}`, role: 'tooltip' } });
|
|
493
494
|
if (content !== undefined) { bubble.textContent = ''; appendContent(bubble, doc, content); }
|
|
494
495
|
if (placement === 'bottom-end') toggleWorkspaceClass(wrap, 'bb-ws-help--bottom-end', true);
|
|
@@ -1428,6 +1429,8 @@ export function workspaceActionIcon(doc, name) {
|
|
|
1428
1429
|
const paths = { edit: 'M4 20h4L19 9l-4-4L4 16z M13.5 6.5l4 4', undo: 'M4 5v5h5 M4.6 10A8 8 0 1 1 6.3 17.7', check: 'M5 12l5 5 9-10', sliders: 'M4 8h8M18 8h2M4 16h2M12 16h8 M17.4 8a2.4 2.4 0 1 1-4.8 0 2.4 2.4 0 0 1 4.8 0 M11.4 16a2.4 2.4 0 1 1-4.8 0 2.4 2.4 0 0 1 4.8 0', plus: 'M12 5v14M5 12h14', search: 'M21 21l-4.35-4.35M19 11a8 8 0 1 1-16 0 8 8 0 0 1 16 0', filter: 'M4 7h16M7 12h10M10 17h4', sort: 'M8 4v16m-3-3 3 3 3-3M16 20V4m-3 3 3-3 3 3', close: 'M6 6l12 12M18 6L6 18', sparkles: 'M12 3l1.8 6.7 6.7 1.8-6.7 1.8L12 20l-1.8-6.7-6.7-1.8 6.7-1.8z M19 2v4 M17 4h4' };
|
|
1429
1430
|
Object.assign(paths, {
|
|
1430
1431
|
copy: 'M9 9h12v12H9z M5 15H3V3h12v2',
|
|
1432
|
+
help: 'M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0 M9.6 9.3a2.5 2.5 0 0 1 4.8.8c0 1.7-2.4 2.1-2.4 3.7 M12 17h.01',
|
|
1433
|
+
'arrow-right': 'M5 12h14m-5-5 5 5-5 5',
|
|
1431
1434
|
star: 'M12 3.5l2.6 5.3 5.9.9-4.2 4.1 1 5.8-5.3-2.8-5.3 2.8 1-5.8-4.2-4.1 5.9-.9z',
|
|
1432
1435
|
lock: 'M6 10h12v11H6z M8 10V7a4 4 0 1 1 8 0v3',
|
|
1433
1436
|
clock: 'M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0 M12 7v5l3 2',
|
|
@@ -1853,3 +1856,49 @@ export function workspaceDotPill(doc, { label, color } = {}) {
|
|
|
1853
1856
|
if (color) { const dot = el(doc, 'i', { attrs: { 'aria-hidden': 'true' } }); dot.style?.setProperty('--bb-pill-dot', color); root.append(dot); }
|
|
1854
1857
|
root.append(el(doc, 'span', { text: label })); return root;
|
|
1855
1858
|
}
|
|
1859
|
+
|
|
1860
|
+
/** A controlled sequence of steps beside host-owned identifying facts. */
|
|
1861
|
+
export function workspaceStepBand(doc, { facts, label, steps = [], value, onChange } = {}) {
|
|
1862
|
+
const root = el(doc, 'section', { className: 'bb-ws-step-band' });
|
|
1863
|
+
const identity = el(doc, 'div', { className: 'bb-ws-step-facts' });
|
|
1864
|
+
appendContent(identity, doc, facts);
|
|
1865
|
+
const list = el(doc, 'ol', { className: 'bb-ws-steps', attrs: { 'aria-label': label } });
|
|
1866
|
+
const controls = [];
|
|
1867
|
+
for (const [index, step] of steps.entries()) {
|
|
1868
|
+
const item = el(doc, 'li');
|
|
1869
|
+
const control = workspaceButton(doc, { attrs: { disabled: step.disabled, 'aria-current': step.id === value ? 'step' : 'false' }, onClick: () => { if (!control.disabled) onChange?.(step.id, step); } });
|
|
1870
|
+
control.className = `bb-ws-step${step.complete === true ? ' is-complete' : ''}`;
|
|
1871
|
+
control.disabled = Boolean(step.disabled);
|
|
1872
|
+
const number = el(doc, 'i', { attrs: { 'aria-hidden': 'true' } });
|
|
1873
|
+
if (step.complete === true) number.append(workspaceActionIcon(doc, 'check')); else number.textContent = String(index + 1);
|
|
1874
|
+
const copy = el(doc, 'span');
|
|
1875
|
+
copy.append(el(doc, 'b', { text: step.label }), el(doc, 'small', { text: step.status }));
|
|
1876
|
+
control.append(number, copy); item.append(control); list.append(item);
|
|
1877
|
+
controls.push({ id: step.id, control });
|
|
1878
|
+
}
|
|
1879
|
+
root.append(identity, list);
|
|
1880
|
+
root.update = next => { for (const { id, control } of controls) control.setAttribute('aria-current', id === next ? 'step' : 'false'); };
|
|
1881
|
+
return root;
|
|
1882
|
+
}
|
|
1883
|
+
|
|
1884
|
+
/** Candidate buttons only select a supplied value; the host owns confirmation. */
|
|
1885
|
+
export function workspaceCandidateChoices(doc, { label, items = [], value, disabled = false, onChange } = {}) {
|
|
1886
|
+
const root = el(doc, 'div', { className: 'bb-ws-candidate-choices', attrs: { role: 'group', 'aria-label': label } });
|
|
1887
|
+
const controls = [];
|
|
1888
|
+
for (const item of items) {
|
|
1889
|
+
const control = workspaceButton(doc, { disabled: disabled || item.disabled, onClick: () => { if (!control.disabled) onChange?.(item.value, item); }, attrs: { 'aria-pressed': String(item.value === value) } });
|
|
1890
|
+
control.className = `bb-ws-candidate-choice${item.quiet ? ' is-quiet' : ''}`;
|
|
1891
|
+
control.disabled = Boolean(disabled || item.disabled);
|
|
1892
|
+
const check = workspaceActionIcon(doc, 'check'); check.classList?.add('bb-ws-candidate-check');
|
|
1893
|
+
control.append(check, el(doc, 'span', { text: item.label }));
|
|
1894
|
+
if (item.reason) control.append(el(doc, 'small', { text: item.reason }));
|
|
1895
|
+
root.append(control); controls.push({ item, control });
|
|
1896
|
+
}
|
|
1897
|
+
root.update = (next, options = {}) => {
|
|
1898
|
+
for (const { item, control } of controls) {
|
|
1899
|
+
control.setAttribute('aria-pressed', String(item.value === next));
|
|
1900
|
+
control.disabled = Boolean((options.disabled ?? disabled) || item.disabled);
|
|
1901
|
+
}
|
|
1902
|
+
};
|
|
1903
|
+
return root;
|
|
1904
|
+
}
|
package/ui/world/world-view.js
CHANGED
|
@@ -1568,7 +1568,7 @@ function memoryLines(answer) {
|
|
|
1568
1568
|
if (Number.isInteger(count) && count >= 0) {
|
|
1569
1569
|
const href = typeof answer.review_href === 'string' && exitHrefKind(answer.review_href) ? answer.review_href : null;
|
|
1570
1570
|
const link = href && count > 0 ? { href, label: '候補の確認を開く', className: 'bb-world-memory-link' } : null;
|
|
1571
|
-
if (count > 0) lines.push({ text: `あなたが決める記憶の候補 ${count}
|
|
1571
|
+
if (count > 0) lines.push({ text: `あなたが決める記憶の候補 ${count}件。取り込んだものだけが正式な記録になります。`, tone: 'attention', summary: `あなたが決める記憶の候補 ${count}件`, link });
|
|
1572
1572
|
else lines.push({ text: 'あなたが決める記憶の候補はありません。', tone: 'info', summary: null });
|
|
1573
1573
|
} else {
|
|
1574
1574
|
lines.push({ text: '記憶の候補:読めない。件数は0件とは確認できません。', tone: 'warning', summary: '記憶の候補:読めない' });
|