@unson/brainbase-mcp 0.50.22 → 0.50.23

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unson/brainbase-mcp",
3
- "version": "0.50.22",
3
+ "version": "0.50.23",
4
4
  "description": "Local-first Brainbase judgment OS that lets supported AI agents reuse a user's approved goals, priorities, decisions, and judgment criteria.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -657,5 +657,5 @@
657
657
  "url": "https://github.com/Unson-LLC/brainbase/issues"
658
658
  },
659
659
  "homepage": "https://github.com/Unson-LLC/brainbase#readme",
660
- "gitHead": "f419a25d1acca1bc6548a4419968efdfca053c42"
660
+ "gitHead": "49263ad02569eb3b2cccc652cade085502f82d4d"
661
661
  }
@@ -1320,6 +1320,23 @@
1320
1320
  .bb-ws-status-pill.is-success { background:var(--bb-color-accent-soft); color:var(--bb-color-success); }
1321
1321
  .bb-ws-status-pill.is-warning { background:var(--bb-color-warning-soft); color:var(--bb-color-warning); font-weight:600; }
1322
1322
  .bb-ws-status-pill.is-danger { background:var(--bb-color-danger-soft); color:var(--bb-color-danger); }
1323
+ .bb-ws-status-pill.bb-ws-status-pill--compact { min-height:20px; height:20px; padding:0 8px; font-size:11px; }
1324
+ .bb-ws-tabs--header .bb-ws-tab-count.is-zero { background:none; color:var(--bb-color-muted); font-weight:400; }
1325
+ .bb-ws-progress-bar { display:block; width:100%; height:6px; overflow:hidden; border-radius:3px; background:var(--bb-color-canvas); }
1326
+ .bb-ws-progress-segment.is-done { fill:var(--bb-color-action); }
1327
+ .bb-ws-progress-segment.is-remaining { fill:var(--bb-color-mint); opacity:.55; }
1328
+ .bb-ws-progress-segment.is-review { fill:var(--bb-color-review); }
1329
+ .bb-ws-empty-state { display:grid; justify-items:center; gap:14px; padding:0; color:var(--bb-color-slate); font-size:13.5px; text-align:center; }
1330
+ .bb-ws-empty-state > p { margin:0; }
1331
+ .bb-ws-empty-state-mark { display:grid; place-items:center; width:48px; height:48px; border-radius:var(--bb-radius-pill); background:var(--bb-color-accent-soft); color:var(--bb-color-mint); }
1332
+ .bb-ws-empty-state-mark .bb-ws-action-icon { width:22px; height:22px; stroke-width:2.2; }
1333
+ .bb-ws-empty-state-action { margin-top:4px; }
1334
+ .bb-ws-form-row.is-stacked { display:grid; grid-template-columns:minmax(0,1fr); align-items:start; min-height:0; gap:6px; padding:0; box-shadow:none; }
1335
+ .bb-ws-form-row.is-stacked:focus-within { box-shadow:none; }
1336
+ .bb-ws-form-row.is-stacked > :is(input,textarea) { box-sizing:border-box; width:100%; min-width:0; height:36px; margin:0; padding:0 12px; border:0; border-radius:7px; background:var(--bb-color-canvas); color:var(--bb-color-ink); font:400 13.5px/1.6 var(--bb-font-sans); outline:none; box-shadow:none; }
1337
+ .bb-ws-form-row.is-stacked > textarea { height:auto; min-height:84px; padding-block:8px; resize:vertical; }
1338
+ .bb-ws-form-row.is-stacked > :is(input,textarea):focus { border:0; outline:none; background:var(--bb-color-accent-soft); box-shadow:none; }
1339
+ .bb-ws-form-row.is-stacked > small { color:var(--bb-color-muted); font-size:11.5px; }
1323
1340
 
1324
1341
  .bb-ws-checkbox { appearance:none; display:inline-grid; place-items:center; flex:none; box-sizing:border-box; width:16px; min-width:16px; height:16px; margin:0; padding:0; border:0; border-radius:4px; background:var(--bb-color-paper); box-shadow:inset 0 0 0 1.5px var(--bb-color-border); color:transparent; vertical-align:middle; cursor:pointer; }
1325
1342
  .bb-ws-checkbox:hover:not(:disabled) { box-shadow:inset 0 0 0 1.5px var(--bb-color-muted); }
@@ -273,14 +273,56 @@ export function workspaceActions(doc, buttons = []) {
273
273
  }
274
274
 
275
275
  /** A business-neutral status label. The host supplies its text and meaning. */
276
- export function workspaceStatusPill(doc, { label, tone = 'neutral', width, attrs = {} } = {}) {
276
+ export function workspaceStatusPill(doc, { label, tone = 'neutral', width, appearance, attrs = {} } = {}) {
277
277
  const tones = new Set(['neutral', 'success', 'warning', 'danger']);
278
- const appearance = tones.has(tone) ? tone : 'neutral';
279
- const pill = el(doc, 'span', { className: `bb-ws-status-pill is-${appearance}`, text: label, attrs });
278
+ const pill = el(doc, 'span', { className: `bb-ws-status-pill is-${tones.has(tone) ? tone : 'neutral'}${appearance === 'compact' ? ' bb-ws-status-pill--compact' : ''}`, text: label, attrs });
280
279
  if (Number.isFinite(width) && width > 0) pill.style?.setProperty('--bb-status-pill-width', `${width}px`);
281
280
  return pill;
282
281
  }
283
282
 
283
+ /** A segmented visual proportion. Hosts supply confirmed quantities and meaning. */
284
+ export function workspaceProgressBar(doc, { segments = [], label } = {}) {
285
+ const tones = new Set(['done', 'remaining', 'review']);
286
+ if (!Array.isArray(segments) || !segments.length || segments.some(segment =>
287
+ !segment || !Number.isFinite(segment.value) || segment.value < 0 || !tones.has(segment.tone))) {
288
+ throw new TypeError('workspace_progress_segments_required');
289
+ }
290
+ const total = segments.reduce((sum, segment) => sum + segment.value, 0);
291
+ if (!Number.isFinite(total) || total <= 0) throw new RangeError('workspace_progress_total_must_be_positive');
292
+ const svgElement = (name, attrs) => {
293
+ const node = typeof doc.createElementNS === 'function'
294
+ ? doc.createElementNS('http://www.w3.org/2000/svg', name) : doc.createElement(name);
295
+ for (const [key, value] of Object.entries(attrs)) node.setAttribute(key, String(value));
296
+ return node;
297
+ };
298
+ const root = svgElement('svg', { class: 'bb-ws-progress-bar', viewBox: '0 0 100 6', preserveAspectRatio: 'none',
299
+ ...(label ? { role: 'img', 'aria-label': label } : { 'aria-hidden': 'true' }) });
300
+ let offset = 0;
301
+ // Review is always the final portion; the caller's array is never mutated.
302
+ const ordered = [...segments.filter(segment => segment.tone !== 'review'), ...segments.filter(segment => segment.tone === 'review')];
303
+ for (const segment of ordered) {
304
+ if (segment.value === 0) continue;
305
+ const width = segment.value / total * 100;
306
+ root.append(svgElement('rect', { class: `bb-ws-progress-segment is-${segment.tone}`, x: offset, y: 0, width, height: 6 }));
307
+ offset += width;
308
+ }
309
+ return root;
310
+ }
311
+
312
+ /** An empty list invitation. Copy and action remain owned by the host. */
313
+ export function workspaceEmptyState(doc, { text, icon = 'folder', action } = {}) {
314
+ const root = el(doc, 'div', { className: 'bb-ws-empty-state' });
315
+ const mark = el(doc, 'span', { className: 'bb-ws-empty-state-mark', attrs: { 'aria-hidden': 'true' } });
316
+ mark.append(workspaceActionIcon(doc, icon));
317
+ root.append(mark, el(doc, 'p', { text }));
318
+ if (action) {
319
+ const actions = el(doc, 'div', { className: 'bb-ws-empty-state-action' });
320
+ appendContent(actions, doc, action);
321
+ root.append(actions);
322
+ }
323
+ return root;
324
+ }
325
+
284
326
  /** Native checkbox with the shared compact mark and caller-owned selection. */
285
327
  export function workspaceCheckbox(doc, { label, checked = false, indeterminate = false, disabled = false, onChange, attrs = {} } = {}) {
286
328
  const checkbox = el(doc, 'input', { className: 'bb-ws-checkbox', attrs: {
@@ -1384,6 +1426,7 @@ export function workspaceActionIcon(doc, name) {
1384
1426
  const path = typeof doc.createElementNS === 'function' ? doc.createElementNS('http://www.w3.org/2000/svg', 'path') : doc.createElement('path');
1385
1427
  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' };
1386
1428
  Object.assign(paths, {
1429
+ copy: 'M9 9h12v12H9z M5 15H3V3h12v2',
1387
1430
  lock: 'M6 10h12v11H6z M8 10V7a4 4 0 1 1 8 0v3',
1388
1431
  clock: 'M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0 M12 7v5l3 2',
1389
1432
  users: 'M12.2 8a3.2 3.2 0 1 1-6.4 0 3.2 3.2 0 0 1 6.4 0 M3 20c0-3.3 2.7-5.5 6-5.5s6 2.2 6 5.5 M16 5.2a3.2 3.2 0 0 1 0 5.6 M18 14.8c1.9.7 3 2.5 3 5.2',
@@ -1650,7 +1693,7 @@ export function workspaceControlRow(doc, { label, control, tight = false } = {})
1650
1693
  }
1651
1694
 
1652
1695
  export function workspaceFormRow(doc, { label, control, required = false, top = false, appearance } = {}) {
1653
- const root = el(doc, 'div', { className: `bb-ws-form-row${top ? ' is-top' : ''}${appearance === 'quiet' ? ' is-quiet' : ''}` });
1696
+ const root = el(doc, 'div', { className: `bb-ws-form-row${top ? ' is-top' : ''}${appearance === 'quiet' ? ' is-quiet' : ''}${appearance === 'stacked' ? ' is-stacked' : ''}` });
1654
1697
  const caption = el(doc, control?.id ? 'label' : 'span', { className: 'bb-ws-form-label', text: label,
1655
1698
  attrs: { for: control?.id || undefined } });
1656
1699
  if (required) {