@makinbakin/sdk 0.0.1-rc.31 → 0.0.1-rc.32

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.
@@ -39,6 +39,8 @@ export interface BakinPaths {
39
39
  db: string;
40
40
  /** Bakin-owned bin dir for capability-pack binaries; prepended to PATH at server boot. */
41
41
  bin: string;
42
+ /** Media prebuild store (sharp for compiled binaries, #889) — versioned dirs + receipt. */
43
+ media: string;
42
44
  }
43
45
  export declare function getBakinPaths(): BakinPaths;
44
46
  /**
@@ -0,0 +1,36 @@
1
+ /**
2
+ * GENERATED by scripts/generate-media-pin.ts — do not edit by hand.
3
+ * Regenerate: bun scripts/generate-media-pin.ts --sharp-version <v>
4
+ * Pin-bump runbook: .claude/knowledge/media-pipeline.md
5
+ * Self-contained by design: importing types from ./pin creates an import
6
+ * cycle (check:cycles); ./pin structurally types this object on assignment.
7
+ */
8
+ export declare const SHARP_PIN_DATA: {
9
+ version: string;
10
+ shared: {
11
+ name: string;
12
+ version: string;
13
+ url: string;
14
+ sha256: string;
15
+ }[];
16
+ platform: {
17
+ 'darwin-arm64': {
18
+ name: string;
19
+ version: string;
20
+ url: string;
21
+ sha256: string;
22
+ }[];
23
+ 'linux-x64': {
24
+ name: string;
25
+ version: string;
26
+ url: string;
27
+ sha256: string;
28
+ }[];
29
+ 'linux-arm64': {
30
+ name: string;
31
+ version: string;
32
+ url: string;
33
+ sha256: string;
34
+ }[];
35
+ };
36
+ };
@@ -0,0 +1,22 @@
1
+ export declare const MEDIA_PLATFORM_KEYS: readonly ["darwin-arm64", "linux-x64", "linux-arm64"];
2
+ export type MediaPlatformKey = (typeof MEDIA_PLATFORM_KEYS)[number];
3
+ export interface PinnedTarball {
4
+ name: string;
5
+ version: string;
6
+ url: string;
7
+ /** Lowercase hex sha256 of the npm tarball. */
8
+ sha256: string;
9
+ }
10
+ export interface SharpPin {
11
+ /** The pinned sharp version — also the store directory name. */
12
+ version: string;
13
+ /** Platform-neutral tarballs (sharp + its runtime JS deps). */
14
+ shared: PinnedTarball[];
15
+ /** Native + libvips tarballs per supported platform. */
16
+ platform: Record<MediaPlatformKey, PinnedTarball[]>;
17
+ }
18
+ export declare const SHARP_PIN: SharpPin;
19
+ /** Map this process's platform/arch onto a media platform key. */
20
+ export declare function mediaPlatformKey(): MediaPlatformKey | null;
21
+ /** Every tarball the given platform's store needs, shared legs first. */
22
+ export declare function pinnedTarballsFor(key: MediaPlatformKey): PinnedTarball[];
@@ -0,0 +1,10 @@
1
+ /**
2
+ * The sharp loader's two raw import legs (#889), isolated so tests can mock
3
+ * them per-case (a `mock.module('sharp', …)` factory evaluates eagerly and
4
+ * cannot model per-test availability, and the repo's devDependency sharp
5
+ * would otherwise satisfy the bundled leg in every test).
6
+ */
7
+ /** Bare import — resolves on dev trees/npm installs, fails in compiled binaries. */
8
+ export declare function importBundledSharp(): Promise<unknown>;
9
+ /** Disk import of the media store's self-contained bundle. */
10
+ export declare function importStoreBundle(entry: string): Promise<unknown>;
@@ -33,4 +33,9 @@ export interface SharpPipeline {
33
33
  toFile(path: string): Promise<unknown>;
34
34
  }
35
35
  export type Sharp = (input: string) => SharpPipeline;
36
+ /**
37
+ * Drop the cached load state. The installer calls this after a successful
38
+ * store install; tests use it between cases.
39
+ */
40
+ export declare function resetSharpModuleCache(): void;
36
41
  export declare function loadSharp(): Promise<Sharp | null>;
@@ -0,0 +1,21 @@
1
+ import { type MediaPlatformKey } from './pin';
2
+ export declare const MEDIA_RECEIPT_SCHEMA = 1;
3
+ export interface MediaReceipt {
4
+ schema: number;
5
+ sharpVersion: string;
6
+ platform: MediaPlatformKey;
7
+ /** Store-relative path of the bundled sharp entry. */
8
+ entry: string;
9
+ installedAt: string;
10
+ tarballs: {
11
+ name: string;
12
+ version: string;
13
+ sha256: string;
14
+ }[];
15
+ }
16
+ /** `<bakin-home>/media/sharp/<pinned version>/` — the live store dir. */
17
+ export declare function mediaStoreDir(): string;
18
+ export declare function mediaReceiptPath(): string;
19
+ export declare function readMediaReceipt(): MediaReceipt | null;
20
+ /** The bundled sharp entry the loader imports, or null without a valid receipt. */
21
+ export declare function mediaStoreEntry(): string | null;
@@ -12,6 +12,7 @@ export interface AgentFilterProps {
12
12
  ariaLabel?: string;
13
13
  allLabel?: string;
14
14
  allValue?: string;
15
+ /** Show the standalone indicator (default true). A parent filter region owns it instead when present. */
15
16
  showIcon?: boolean;
16
17
  compact?: boolean;
17
18
  className?: string;
@@ -0,0 +1,3 @@
1
+ /** Private composition context: a parent filter region already owns the icon. */
2
+ export declare const FilterIndicatorContext: import("react").Context<boolean>;
3
+ export declare function FilterIndicator(): import("react/jsx-runtime").JSX.Element;
@@ -84,7 +84,7 @@ export declare const ListRowLabels: import("react").ForwardRefExoticComponent<Om
84
84
  export interface ListRowGroupProps extends ComponentPropsWithoutRef<'div'> {
85
85
  /** Group heading rendered above the group's rows. */
86
86
  label: ReactNode;
87
- /** Compact rail label (default), or a flush, filled collection section heading. */
87
+ /** Compact rail label (default), or a flush, filled heading with extra spacing between adjacent section groups. */
88
88
  headerVariant?: 'plain' | 'section';
89
89
  /** Section heading rail color; neutral by default. Does not color the rows. */
90
90
  headerTone?: 'neutral' | 'accent' | 'success' | 'attention' | 'danger' | 'info';
@@ -17,6 +17,8 @@ export type PageControlsProps = NativeControlsProps & AccessibleRegionName & {
17
17
  * such as graph tools.
18
18
  */
19
19
  as?: PageControlsAs;
20
+ /** Filters own one leading indicator; nested AgentFilters omit theirs. Generic controls stay unchanged. */
21
+ variant?: 'default' | 'filters';
20
22
  /** Search, filters, view controls, and commands supplied by the consumer. */
21
23
  children: React.ReactNode;
22
24
  /**
@@ -27,5 +29,5 @@ export type PageControlsProps = NativeControlsProps & AccessibleRegionName & {
27
29
  divider?: boolean;
28
30
  };
29
31
  /** Named control region or ARIA toolbar. URL state remains owned by the consuming page. */
30
- export declare function PageControls({ actions, as, children, className, divider, label, labelledBy, ...props }: PageControlsProps): import("react/jsx-runtime").JSX.Element;
32
+ export declare function PageControls({ actions, as, variant, children, className, divider, label, labelledBy, ...props }: PageControlsProps): import("react/jsx-runtime").JSX.Element;
31
33
  export {};
@@ -6477,6 +6477,10 @@ async function inspectBrowserPage(page) {
6477
6477
  }
6478
6478
  async function keyboardFocusFindings(page, viewport) {
6479
6479
  const targets = await page.evaluate(() => {
6480
+ if (document.activeElement instanceof HTMLElement)
6481
+ document.activeElement.blur();
6482
+ document.body.tabIndex = -1;
6483
+ document.body.focus();
6480
6484
  const selector = 'a[href], button:not(:disabled), input:not(:disabled), select:not(:disabled), textarea:not(:disabled), [contenteditable="true"], [tabindex]:not([tabindex="-1"])';
6481
6485
  const visibleElements = [...document.querySelectorAll(selector)].filter((element) => {
6482
6486
  const style = getComputedStyle(element);
@@ -6502,10 +6506,17 @@ ${element.name}`) ?? [element];
6502
6506
  const id = String(index);
6503
6507
  element.setAttribute("data-bakin-ui-test-focus-id", id);
6504
6508
  const style = getComputedStyle(element);
6509
+ const group = element.matches('[data-slot="input-group-control"]') ? element.closest('[data-slot="input-group"]') : null;
6510
+ const groupStyle = group ? getComputedStyle(group) : null;
6505
6511
  return {
6506
6512
  id,
6507
6513
  label: (element.getAttribute("aria-label") || element.textContent?.trim() || element.tagName.toLowerCase()).slice(0, 80),
6508
6514
  resting: {
6515
+ groupOutline: groupStyle ? {
6516
+ style: groupStyle.outlineStyle,
6517
+ width: groupStyle.outlineWidth,
6518
+ color: groupStyle.outlineColor
6519
+ } : null,
6509
6520
  backgroundColor: style.backgroundColor,
6510
6521
  borderColor: style.borderColor,
6511
6522
  boxShadow: style.boxShadow,
@@ -6518,10 +6529,6 @@ ${element.name}`) ?? [element];
6518
6529
  }
6519
6530
  };
6520
6531
  });
6521
- if (document.activeElement instanceof HTMLElement)
6522
- document.activeElement.blur();
6523
- document.body.tabIndex = -1;
6524
- document.body.focus();
6525
6532
  return targets2;
6526
6533
  });
6527
6534
  if (targets.length === 0)
@@ -6562,10 +6569,14 @@ ${element.name}`) ?? [element];
6562
6569
  "transform"
6563
6570
  ].some((property) => focused[property] !== resting[property]);
6564
6571
  const focusVisible = element.matches(":focus-visible");
6572
+ const group = element.matches('[data-slot="input-group-control"]') ? element.closest('[data-slot="input-group"]') : null;
6573
+ const groupStyle = group ? getComputedStyle(group) : null;
6574
+ const groupResting = resting?.groupOutline;
6575
+ const groupRingChanged = Boolean(groupStyle && groupResting && groupStyle.outlineStyle !== "none" && groupStyle.outlineStyle !== "hidden" && Number.parseFloat(groupStyle.outlineWidth) > 0 && groupStyle.outlineColor !== "transparent" && !/(?:^rgba\(.+,|\/)\s*0(?:\.0+)?%?\s*\)$/.test(groupStyle.outlineColor) && (groupStyle.outlineStyle !== groupResting.style || groupStyle.outlineWidth !== groupResting.width || groupStyle.outlineColor !== groupResting.color));
6565
6576
  const label = element.getAttribute("aria-label") || element.textContent?.trim() || element.tagName.toLowerCase();
6566
6577
  return {
6567
6578
  reached: Boolean(id),
6568
- visible: focusVisible && (visibleOutline && outlineChanged || shadowChanged || surfaceChanged),
6579
+ visible: focusVisible && (visibleOutline && outlineChanged || shadowChanged || surfaceChanged || groupRingChanged),
6569
6580
  id,
6570
6581
  label: label.slice(0, 80),
6571
6582
  diagnostic: `focus-visible=${focusVisible}; outline=${style.outlineStyle} ${style.outlineWidth}; shadow=${style.boxShadow}`