@makinbakin/sdk 0.0.0-bootstrap.0

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.
Files changed (114) hide show
  1. package/README.md +107 -0
  2. package/_internal/app/components/agent-avatar.d.ts +11 -0
  3. package/_internal/app/components/agent-filter.d.ts +8 -0
  4. package/_internal/app/components/agent-select.d.ts +15 -0
  5. package/_internal/app/components/agent-status.d.ts +8 -0
  6. package/_internal/app/components/bakin-drawer.d.ts +23 -0
  7. package/_internal/app/components/color-picker.d.ts +7 -0
  8. package/_internal/app/components/empty-state.d.ts +10 -0
  9. package/_internal/app/components/error-banner.d.ts +6 -0
  10. package/_internal/app/components/error-state.d.ts +8 -0
  11. package/_internal/app/components/facet-filter.d.ts +17 -0
  12. package/_internal/app/components/integrated-brainstorm/collapsed-header.d.ts +14 -0
  13. package/_internal/app/components/integrated-brainstorm/empty-state.d.ts +5 -0
  14. package/_internal/app/components/integrated-brainstorm/index.d.ts +3 -0
  15. package/_internal/app/components/integrated-brainstorm/input-row.d.ts +16 -0
  16. package/_internal/app/components/integrated-brainstorm/message-list.d.ts +8 -0
  17. package/_internal/app/components/integrated-brainstorm/thinking-indicator.d.ts +19 -0
  18. package/_internal/app/components/integrated-brainstorm/types.d.ts +61 -0
  19. package/_internal/app/components/integrated-brainstorm/use-auto-grow.d.ts +6 -0
  20. package/_internal/app/components/integrated-brainstorm/use-brainstorm-state.d.ts +21 -0
  21. package/_internal/app/components/markdown-content.d.ts +3 -0
  22. package/_internal/app/components/markdown-editor.d.ts +11 -0
  23. package/_internal/app/components/model-select.d.ts +9 -0
  24. package/_internal/app/components/page-layout.d.ts +9 -0
  25. package/_internal/app/components/plugin-header.d.ts +16 -0
  26. package/_internal/app/components/plugin-settings-renderer.d.ts +9 -0
  27. package/_internal/app/components/sortable-head.d.ts +13 -0
  28. package/_internal/app/components/ui/alert.d.ts +10 -0
  29. package/_internal/app/components/ui/avatar.d.ts +11 -0
  30. package/_internal/app/components/ui/badge.d.ts +7 -0
  31. package/_internal/app/components/ui/button.d.ts +8 -0
  32. package/_internal/app/components/ui/card.d.ts +11 -0
  33. package/_internal/app/components/ui/checkbox.d.ts +3 -0
  34. package/_internal/app/components/ui/collapsible.d.ts +5 -0
  35. package/_internal/app/components/ui/command.d.ts +19 -0
  36. package/_internal/app/components/ui/dialog.d.ts +17 -0
  37. package/_internal/app/components/ui/dropdown-menu.d.ts +29 -0
  38. package/_internal/app/components/ui/form.d.ts +23 -0
  39. package/_internal/app/components/ui/input-group.d.ts +18 -0
  40. package/_internal/app/components/ui/input.d.ts +3 -0
  41. package/_internal/app/components/ui/label.d.ts +3 -0
  42. package/_internal/app/components/ui/popover.d.ts +9 -0
  43. package/_internal/app/components/ui/progress.d.ts +7 -0
  44. package/_internal/app/components/ui/select.d.ts +15 -0
  45. package/_internal/app/components/ui/separator.d.ts +3 -0
  46. package/_internal/app/components/ui/sheet.d.ts +14 -0
  47. package/_internal/app/components/ui/skeleton.d.ts +2 -0
  48. package/_internal/app/components/ui/switch.d.ts +5 -0
  49. package/_internal/app/components/ui/table.d.ts +10 -0
  50. package/_internal/app/components/ui/tabs.d.ts +10 -0
  51. package/_internal/app/components/ui/textarea.d.ts +3 -0
  52. package/_internal/app/components/ui/tooltip.d.ts +6 -0
  53. package/_internal/app/components/underline-tabs.d.ts +15 -0
  54. package/_internal/app/hooks/use-assets.d.ts +25 -0
  55. package/_internal/app/hooks/use-content-store.d.ts +36 -0
  56. package/_internal/app/hooks/use-debug.d.ts +1 -0
  57. package/_internal/app/hooks/use-form-guard.d.ts +5 -0
  58. package/_internal/app/hooks/use-query-state.d.ts +14 -0
  59. package/_internal/app/hooks/use-runtime-status.d.ts +12 -0
  60. package/_internal/app/hooks/use-schedule.d.ts +63 -0
  61. package/_internal/app/hooks/use-search.d.ts +65 -0
  62. package/_internal/app/hooks/use-sidebar.d.ts +4 -0
  63. package/_internal/app/hooks/use-sse.d.ts +1 -0
  64. package/_internal/app/hooks/use-toast.d.ts +16 -0
  65. package/_internal/app/hooks/use-vertical-resize.d.ts +22 -0
  66. package/_internal/app/lib/browser-notify.d.ts +5 -0
  67. package/_internal/app/lib/map-audit-message.d.ts +7 -0
  68. package/_internal/app/lib/utils.d.ts +2 -0
  69. package/_internal/app/types/index.d.ts +126 -0
  70. package/_internal/core/adapters/runtime/capabilities.d.ts +2 -0
  71. package/_internal/core/adapters/runtime/concepts.d.ts +458 -0
  72. package/_internal/core/adapters/runtime/helpers.d.ts +5 -0
  73. package/_internal/core/adapters/runtime/index.d.ts +5 -0
  74. package/_internal/core/adapters/shared.d.ts +37 -0
  75. package/_internal/core/docs/index.d.ts +2 -0
  76. package/_internal/core/docs/metadata.d.ts +92 -0
  77. package/_internal/core/docs/route.d.ts +9 -0
  78. package/_internal/core/format.d.ts +6 -0
  79. package/_internal/core/openapi/errors.d.ts +29 -0
  80. package/_internal/core/openapi/zod-to-openapi.d.ts +14 -0
  81. package/_internal/core/plugin-types.d.ts +849 -0
  82. package/_internal/core/routing/define.d.ts +34 -0
  83. package/_internal/core/routing/dispatcher.d.ts +44 -0
  84. package/_internal/core/routing/index.d.ts +15 -0
  85. package/_internal/core/routing/operation-id.d.ts +9 -0
  86. package/_internal/core/routing/registry.d.ts +52 -0
  87. package/_internal/core/routing/search-route.d.ts +26 -0
  88. package/_internal/core/routing/types.d.ts +123 -0
  89. package/_internal/plugins/team/hooks/use-agent-store.d.ts +49 -0
  90. package/_internal/plugins/team/types.d.ts +131 -0
  91. package/_internal/plugins/workflows/hooks/channel-icon.d.ts +6 -0
  92. package/_internal/plugins/workflows/hooks/use-notification-channels.d.ts +13 -0
  93. package/_internal/plugins/workflows/lib/notification-channel-registry.d.ts +26 -0
  94. package/components/index.d.ts +33 -0
  95. package/components/index.js +39522 -0
  96. package/hooks/index.d.ts +25 -0
  97. package/hooks/index.js +1738 -0
  98. package/hooks/router.d.ts +38 -0
  99. package/index.d.ts +27 -0
  100. package/index.js +13917 -0
  101. package/metadata/index.d.ts +16 -0
  102. package/metadata/index.js +31 -0
  103. package/package.json +88 -0
  104. package/register.d.ts +103 -0
  105. package/routing/index.d.ts +11 -0
  106. package/routing/index.js +13721 -0
  107. package/slots/index.d.ts +55 -0
  108. package/slots/index.js +92 -0
  109. package/types/index.d.ts +840 -0
  110. package/types/index.js +1 -0
  111. package/ui/index.d.ts +34 -0
  112. package/ui/index.js +28713 -0
  113. package/utils/index.d.ts +9 -0
  114. package/utils/index.js +1832 -0
package/README.md ADDED
@@ -0,0 +1,107 @@
1
+ # @makinbakin/sdk
2
+
3
+ SDK for building [Bakin](https://github.com/markhayden/bakin) plugins.
4
+ Gives you the `registerPlugin` helper, shared UI components, slot
5
+ types, and React hooks the Bakin host shell already ships at runtime.
6
+
7
+ Your plugin bundles use this package as a TypeScript source, but at
8
+ runtime React + `@makinbakin/sdk/*` are externalized and resolved through
9
+ the host's import map — so plugins don't ship a second copy of any of
10
+ them.
11
+
12
+ ## Install
13
+
14
+ ```sh
15
+ bun install @makinbakin/sdk
16
+ # or
17
+ npm install @makinbakin/sdk
18
+ ```
19
+
20
+ `react` and `react-dom` are peer dependencies; the Bakin host provides
21
+ the actual instances at runtime.
22
+
23
+ ## Quickstart
24
+
25
+ ```sh
26
+ bakin plugins scaffold my-plugin
27
+ cd my-plugin
28
+ bun install
29
+ bakin plugins install .
30
+ ```
31
+
32
+ ## Minimal client entry
33
+
34
+ ```tsx
35
+ // src/client.tsx
36
+ import { registerPlugin } from '@makinbakin/sdk'
37
+
38
+ registerPlugin({
39
+ id: 'my-plugin',
40
+ navItems: [
41
+ { title: 'My plugin', path: '/my-plugin' },
42
+ ],
43
+ pages: {
44
+ '/my-plugin': () => <div>Hello from my plugin</div>,
45
+ },
46
+ })
47
+ ```
48
+
49
+ ## Minimal server entry
50
+
51
+ ```ts
52
+ // src/index.ts
53
+ import type { BakinPlugin, PluginContext } from '@makinbakin/sdk/types'
54
+
55
+ const plugin: BakinPlugin = {
56
+ id: 'my-plugin',
57
+ name: 'My plugin',
58
+ version: '0.1.0',
59
+ async activate(ctx: PluginContext) {
60
+ ctx.registerRoute({
61
+ method: 'GET',
62
+ path: '/hello',
63
+ handler: async () => Response.json({ ok: true }),
64
+ })
65
+ },
66
+ }
67
+
68
+ export default plugin
69
+ ```
70
+
71
+ ## Slots
72
+
73
+ Bakin surfaces these extensibility slots by default. Register a
74
+ component for a slot via `registerPlugin({ slots: { 'slot-name': Component } })`.
75
+
76
+ | Slot | Where it renders |
77
+ | --------------------- | -------------------------------------------------------- |
78
+ | `asset-preview` | Asset card previews on the Assets page |
79
+ | `asset-detail-modal` | Asset detail modal |
80
+ | `task-assets` | Task drawer, asset attachments section |
81
+ | `task-sidebar` | Task drawer sidebar (custom panels for a plugin's tasks) |
82
+ | `home-widget` | Dashboard home widget grid |
83
+ | `page:/<route>` | Full-page mount at `<route>` |
84
+
85
+ ## Sub-path imports
86
+
87
+ The `exports` map covers these sub-paths:
88
+
89
+ | Import path | What it exposes |
90
+ | ------------------------ | -------------------------------------------- |
91
+ | `@makinbakin/sdk` | `registerPlugin`, top-level re-exports |
92
+ | `@makinbakin/sdk/ui` | Base UI components (buttons, cards, inputs) |
93
+ | `@makinbakin/sdk/hooks` | Shared React hooks (useQueryState, useDebug) |
94
+ | `@makinbakin/sdk/components` | Higher-level shell components |
95
+ | `@makinbakin/sdk/slots` | Slot runtime + provider |
96
+ | `@makinbakin/sdk/types` | TypeScript types (`BakinPlugin`, `PluginContext`, etc.) |
97
+ | `@makinbakin/sdk/utils` | Shared utilities |
98
+
99
+ ## Repository
100
+
101
+ This package is developed alongside Bakin in the
102
+ [markhayden/bakin](https://github.com/markhayden/bakin) monorepo, under
103
+ `packages/sdk`. File issues and PRs on the main repository.
104
+
105
+ ## License
106
+
107
+ MIT © markhayden
@@ -0,0 +1,11 @@
1
+ type AvatarSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
2
+ type StatusValue = 'online' | 'working' | 'available' | 'offline';
3
+ interface AgentAvatarProps {
4
+ agentId: string;
5
+ size?: AvatarSize;
6
+ showStatus?: boolean;
7
+ status?: StatusValue;
8
+ className?: string;
9
+ }
10
+ export declare function AgentAvatar({ agentId, size, showStatus, status, className, }: AgentAvatarProps): import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,8 @@
1
+ interface AgentFilterProps {
2
+ agentIds: string[];
3
+ value: string;
4
+ onChange: (agentId: string) => void;
5
+ showIcon?: boolean;
6
+ }
7
+ export declare function AgentFilter({ agentIds, value, onChange, showIcon }: AgentFilterProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,15 @@
1
+ interface AgentSelectProps {
2
+ value: string;
3
+ onValueChange: (value: string) => void;
4
+ /** Show a "None" / "Unassigned" option at the top (default: false) */
5
+ allowNone?: boolean;
6
+ /** Label for the none option (default: "Unassigned") */
7
+ noneLabel?: string;
8
+ /** Placeholder when nothing selected */
9
+ placeholder?: string;
10
+ /** Restrict to a subset of agent IDs */
11
+ agentIds?: string[];
12
+ className?: string;
13
+ }
14
+ export declare function AgentSelect({ value, onValueChange, allowNone, noneLabel, placeholder, agentIds, className, }: AgentSelectProps): import("react/jsx-runtime").JSX.Element;
15
+ export {};
@@ -0,0 +1,8 @@
1
+ import type { Heartbeat } from '../types';
2
+ export declare function AgentDot({ heartbeat }: {
3
+ heartbeat?: Heartbeat;
4
+ }): import("react/jsx-runtime").JSX.Element;
5
+ export declare function AgentStatus({ name, heartbeat }: {
6
+ name: string;
7
+ heartbeat?: Heartbeat;
8
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,23 @@
1
+ declare const MIN_WIDTH = 320;
2
+ declare const MAX_WIDTH = 960;
3
+ declare const DEFAULT_WIDTH = 810;
4
+ declare const DRAWER_WIDTH_STORAGE_KEY = "bakin-drawer-width";
5
+ declare function clampDrawerWidth(width: number): number;
6
+ declare function getDrawerWidthStorageKey(storageKey?: string): string;
7
+ declare function getStoredDrawerWidth(defaultWidth: number, storageKey?: string): number;
8
+ export declare function BakinDrawer({ open, onOpenChange, title, description, actions, children, defaultWidth, storageKey, onBack, dirty, }: {
9
+ open: boolean;
10
+ onOpenChange: (open: boolean) => void;
11
+ title?: React.ReactNode;
12
+ description?: React.ReactNode;
13
+ actions?: React.ReactNode;
14
+ children: React.ReactNode;
15
+ defaultWidth?: number;
16
+ /** Optional suffix for per-context drawer width persistence */
17
+ storageKey?: string;
18
+ /** When provided, a back arrow appears left of the title */
19
+ onBack?: () => void;
20
+ /** When true, closing the drawer shows an "unsaved changes" confirmation */
21
+ dirty?: boolean;
22
+ }): import("react/jsx-runtime").JSX.Element;
23
+ export { MIN_WIDTH, MAX_WIDTH, DEFAULT_WIDTH, DRAWER_WIDTH_STORAGE_KEY, clampDrawerWidth, getDrawerWidthStorageKey, getStoredDrawerWidth, };
@@ -0,0 +1,7 @@
1
+ interface ColorPickerProps {
2
+ value: string;
3
+ onChange: (color: string) => void;
4
+ className?: string;
5
+ }
6
+ export declare function ColorPicker({ value, onChange, className }: ColorPickerProps): import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,10 @@
1
+ import type { LucideIcon } from 'lucide-react';
2
+ interface EmptyStateProps {
3
+ icon?: LucideIcon;
4
+ title: string;
5
+ description?: string;
6
+ action?: React.ReactNode;
7
+ className?: string;
8
+ }
9
+ export declare function EmptyState({ icon: Icon, title, description, action, className }: EmptyStateProps): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,6 @@
1
+ interface ErrorBannerProps {
2
+ message: string;
3
+ onRetry?: () => void;
4
+ }
5
+ export declare function ErrorBanner({ message, onRetry }: ErrorBannerProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -0,0 +1,8 @@
1
+ interface ErrorStateProps {
2
+ title?: string;
3
+ message: string;
4
+ retry?: () => void;
5
+ className?: string;
6
+ }
7
+ export declare function ErrorState({ title, message, retry, className }: ErrorStateProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,17 @@
1
+ export interface FacetOption {
2
+ value: string;
3
+ label: string;
4
+ icon?: React.ReactNode;
5
+ }
6
+ interface FacetFilterProps {
7
+ label: string;
8
+ options: FacetOption[];
9
+ selected: string[];
10
+ onChange: (selected: string[]) => void;
11
+ /** Show search input when options exceed this count (default: 6) */
12
+ searchThreshold?: number;
13
+ /** Optional aggregation counts from search (value → count) */
14
+ counts?: Record<string, number>;
15
+ }
16
+ export declare function FacetFilter({ label, options, selected, onChange, searchThreshold, counts }: FacetFilterProps): import("react/jsx-runtime").JSX.Element;
17
+ export {};
@@ -0,0 +1,14 @@
1
+ import { type LucideIcon } from 'lucide-react';
2
+ interface CollapsedHeaderProps {
3
+ open: boolean;
4
+ collapsible: boolean;
5
+ onToggle: () => void;
6
+ label: string;
7
+ icon: LucideIcon;
8
+ replyCount: number;
9
+ bodyId: string;
10
+ }
11
+ export declare function CollapsedHeader({ open, collapsible, onToggle, label, icon: Icon, replyCount, bodyId, }: CollapsedHeaderProps): import("react/jsx-runtime").JSX.Element;
12
+ export declare const DEFAULT_LABEL = "Brainstorm";
13
+ export declare const DEFAULT_ICON: LucideIcon;
14
+ export {};
@@ -0,0 +1,5 @@
1
+ interface DefaultEmptyStateProps {
2
+ agentId: string;
3
+ }
4
+ export declare function DefaultEmptyState({ agentId }: DefaultEmptyStateProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,3 @@
1
+ import type { IntegratedBrainstormProps } from './types';
2
+ export type { BrainstormMessage, IntegratedBrainstormProps, BrainstormOnSend, SendContext, AssistantTransformed, } from './types';
3
+ export declare function IntegratedBrainstorm({ messages, onMessagesChange, onSend, agentId, onAgentChange, label, icon, placeholder, emptyState, collapsible, defaultOpen, conversationStartHeight, minHeight, maxHeight, maxInputHeight, storageKey, fitParent, showHeader, readOnly, readOnlyNotice, transformAssistantMessage, }: IntegratedBrainstormProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,16 @@
1
+ import type { BrainstormStatus } from './use-brainstorm-state';
2
+ export interface InputRowHandle {
3
+ focus: () => void;
4
+ }
5
+ interface InputRowProps {
6
+ placeholder: string;
7
+ disabled: boolean;
8
+ status: BrainstormStatus;
9
+ maxInputHeight: number;
10
+ agentId?: string;
11
+ onAgentChange?: (agentId: string) => void;
12
+ onSubmit: (text: string) => void | Promise<void>;
13
+ onAbort: () => void;
14
+ }
15
+ export declare const InputRow: import("react").ForwardRefExoticComponent<InputRowProps & import("react").RefAttributes<InputRowHandle>>;
16
+ export {};
@@ -0,0 +1,8 @@
1
+ import type { AssistantTransformed, BrainstormMessage } from './types';
2
+ interface MessageListProps {
3
+ messages: BrainstormMessage[];
4
+ defaultAgentId: string;
5
+ transform?: (raw: string) => AssistantTransformed;
6
+ }
7
+ export declare function MessageList({ messages, defaultAgentId, transform }: MessageListProps): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -0,0 +1,19 @@
1
+ import type { ReactNode } from 'react';
2
+ export declare const THINKING_VERBS: readonly ["sizzling", "crackling", "brewing", "steeping", "curing", "thawing", "smoking", "flipping", "rendering", "marinating", "scrambling", "poaching", "preheating", "microwaving", "baking", "wafting", "simmering", "searing", "whisking", "roasting", "crisping", "churning", "seasoning", "scorching", "folding", "charring", "toasting"];
3
+ interface ThinkingIndicatorProps {
4
+ agentId: string;
5
+ verb: string;
6
+ }
7
+ export declare function ThinkingIndicator({ agentId, verb }: ThinkingIndicatorProps): import("react/jsx-runtime").JSX.Element;
8
+ interface StreamingBubbleProps {
9
+ agentId: string;
10
+ content: string;
11
+ extras?: ReactNode;
12
+ }
13
+ export declare function StreamingBubble({ agentId, content, extras }: StreamingBubbleProps): import("react/jsx-runtime").JSX.Element;
14
+ interface ErrorBubbleProps {
15
+ message: string;
16
+ }
17
+ export declare function ErrorBubble({ message }: ErrorBubbleProps): import("react/jsx-runtime").JSX.Element;
18
+ export declare function AbortedNotice(): import("react/jsx-runtime").JSX.Element;
19
+ export {};
@@ -0,0 +1,61 @@
1
+ import type { LucideIcon } from 'lucide-react';
2
+ import type { ReactNode } from 'react';
3
+ export interface BrainstormMessage {
4
+ id: string;
5
+ role: 'user' | 'assistant';
6
+ content: string;
7
+ agentId?: string;
8
+ timestamp?: string;
9
+ }
10
+ export interface SendContext {
11
+ signal: AbortSignal;
12
+ onToken: (text: string) => void;
13
+ onCustom?: (name: string, data: unknown) => void;
14
+ }
15
+ /**
16
+ * `history` contains the conversation PRIOR to this turn — the new user
17
+ * message is `prompt`, not yet in `history`. When you're posting to an
18
+ * OpenAI-shaped chat endpoint, append `{ role: 'user', content: prompt }`
19
+ * to the mapped history to get the full messages array.
20
+ */
21
+ export type BrainstormOnSend = (prompt: string, history: BrainstormMessage[], ctx: SendContext) => Promise<{
22
+ content: string;
23
+ }>;
24
+ export interface AssistantTransformed {
25
+ text: string;
26
+ extras?: ReactNode;
27
+ }
28
+ export interface IntegratedBrainstormProps {
29
+ messages: BrainstormMessage[];
30
+ onMessagesChange: (next: BrainstormMessage[]) => void;
31
+ onSend: BrainstormOnSend;
32
+ agentId: string;
33
+ onAgentChange?: (agentId: string) => void;
34
+ label?: string;
35
+ icon?: LucideIcon;
36
+ placeholder?: string;
37
+ emptyState?: ReactNode;
38
+ position?: 'bottom';
39
+ collapsible?: boolean;
40
+ defaultOpen?: boolean;
41
+ conversationStartHeight?: number;
42
+ minHeight?: number;
43
+ maxHeight?: number;
44
+ maxInputHeight?: number;
45
+ storageKey?: string;
46
+ /**
47
+ * Fill parent height via flex-1/h-full instead of a fixed pixel height.
48
+ * Drops the drag handle (nothing to drag against) and disables auto-expand
49
+ * (already full-size). Use when the panel IS the pane — e.g. a dedicated
50
+ * chat route — rather than a bottom sheet above other content.
51
+ */
52
+ fitParent?: boolean;
53
+ /**
54
+ * Hide the icon + label + reply-count header entirely. Use when the parent
55
+ * page already has its own title chrome. Default: true (header shown).
56
+ */
57
+ showHeader?: boolean;
58
+ readOnly?: boolean;
59
+ readOnlyNotice?: ReactNode;
60
+ transformAssistantMessage?: (raw: string) => AssistantTransformed;
61
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Drive a textarea's height from its content. Grows up to `maxHeight` px,
3
+ * then internal scroll kicks in. No native resize grip. Pair with a
4
+ * resize-none textarea.
5
+ */
6
+ export declare function useAutoGrow(value: string, maxHeight: number): import("react").RefObject<HTMLTextAreaElement | null>;
@@ -0,0 +1,21 @@
1
+ import type { BrainstormMessage, BrainstormOnSend } from './types';
2
+ export type BrainstormStatus = 'idle' | 'sending' | 'streaming';
3
+ interface UseBrainstormStateOpts {
4
+ messages: BrainstormMessage[];
5
+ onMessagesChange: (next: BrainstormMessage[]) => void;
6
+ onSend: BrainstormOnSend;
7
+ defaultAgentId: string;
8
+ }
9
+ export interface BrainstormController {
10
+ status: BrainstormStatus;
11
+ streamingContent: string;
12
+ thinkingVerb: string;
13
+ errorMessage: string | null;
14
+ wasAborted: boolean;
15
+ send: (prompt: string, options?: {
16
+ onCustom?: (name: string, data: unknown) => void;
17
+ }) => Promise<void>;
18
+ abort: () => void;
19
+ }
20
+ export declare function useBrainstormState({ messages, onMessagesChange, onSend, defaultAgentId, }: UseBrainstormStateOpts): BrainstormController;
21
+ export {};
@@ -0,0 +1,3 @@
1
+ export declare function MarkdownContent({ content }: {
2
+ content: string;
3
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ interface MarkdownEditorProps {
2
+ content: string;
3
+ editing: boolean;
4
+ onChange: (content: string) => void;
5
+ placeholder?: string;
6
+ format?: 'markdown' | 'yaml' | 'json' | 'text';
7
+ minHeight?: string;
8
+ className?: string;
9
+ }
10
+ export declare function MarkdownEditor({ content, editing, onChange, placeholder, format, minHeight, className, }: MarkdownEditorProps): import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -0,0 +1,9 @@
1
+ import type { AvailableModel } from '@makinbakin/sdk/types';
2
+ export type { AvailableModel };
3
+ export declare function ModelSelect({ value, onChange, models, defaultLabel, className, }: {
4
+ value: string;
5
+ onChange: (v: string) => void;
6
+ models: AvailableModel[];
7
+ defaultLabel?: string;
8
+ className?: string;
9
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,9 @@
1
+ interface PageLayoutProps {
2
+ title: string;
3
+ subtitle?: string;
4
+ actions?: React.ReactNode;
5
+ className?: string;
6
+ children: React.ReactNode;
7
+ }
8
+ export declare function PageLayout({ title, subtitle, actions, className, children }: PageLayoutProps): import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -0,0 +1,16 @@
1
+ interface PluginHeaderProps {
2
+ title: string;
3
+ subtitle?: string;
4
+ count?: number;
5
+ actions?: React.ReactNode;
6
+ meta?: React.ReactNode;
7
+ search?: {
8
+ value: string;
9
+ onChange: (value: string) => void;
10
+ placeholder?: string;
11
+ /** Debounce delay in ms (default: 300) */
12
+ debounce?: number;
13
+ };
14
+ }
15
+ export declare function PluginHeader({ title, subtitle, count, actions, meta, search }: PluginHeaderProps): import("react/jsx-runtime").JSX.Element;
16
+ export {};
@@ -0,0 +1,9 @@
1
+ import type { PluginSettingsSchema } from '../../core/plugin-types';
2
+ export type { PluginSettingsSchema };
3
+ interface PluginSettingsRendererProps {
4
+ pluginId: string;
5
+ schema: PluginSettingsSchema;
6
+ values: Record<string, unknown>;
7
+ onSave: (values: Record<string, unknown>) => Promise<void>;
8
+ }
9
+ export declare function PluginSettingsRenderer({ pluginId, schema, values, onSave }: PluginSettingsRendererProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,13 @@
1
+ export type SortDir = 'asc' | 'desc';
2
+ interface SortableHeadProps<F extends string> {
3
+ field: F;
4
+ current: F;
5
+ dir: SortDir;
6
+ onSort: (f: F) => void;
7
+ /** When true, clicks are ignored and the sort indicator is hidden. Used
8
+ * when an upstream relevance order should win. */
9
+ disabled?: boolean;
10
+ children: React.ReactNode;
11
+ }
12
+ export declare function SortableHead<F extends string>({ field, current, dir, onSort, disabled, children, }: SortableHeadProps<F>): import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ declare const alertVariants: (props?: ({
4
+ variant?: "destructive" | "default" | null | undefined;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
+ declare function Alert({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>): import("react/jsx-runtime").JSX.Element;
7
+ declare function AlertTitle({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
8
+ declare function AlertDescription({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
9
+ declare function AlertAction({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
10
+ export { Alert, AlertTitle, AlertDescription, AlertAction };
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ import { Avatar as AvatarPrimitive } from "@base-ui/react/avatar";
3
+ declare function Avatar({ className, size, ...props }: AvatarPrimitive.Root.Props & {
4
+ size?: "default" | "sm" | "lg";
5
+ }): import("react/jsx-runtime").JSX.Element;
6
+ declare function AvatarImage({ className, ...props }: AvatarPrimitive.Image.Props): import("react/jsx-runtime").JSX.Element;
7
+ declare function AvatarFallback({ className, ...props }: AvatarPrimitive.Fallback.Props): import("react/jsx-runtime").JSX.Element;
8
+ declare function AvatarBadge({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
9
+ declare function AvatarGroup({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
10
+ declare function AvatarGroupCount({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
11
+ export { Avatar, AvatarImage, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarBadge, };
@@ -0,0 +1,7 @@
1
+ import { useRender } from "@base-ui/react/use-render";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ declare const badgeVariants: (props?: ({
4
+ variant?: "link" | "destructive" | "default" | "outline" | "secondary" | "ghost" | null | undefined;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
+ declare function Badge({ className, variant, render, ...props }: useRender.ComponentProps<"span"> & VariantProps<typeof badgeVariants>): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
7
+ export { Badge, badgeVariants };
@@ -0,0 +1,8 @@
1
+ import { Button as ButtonPrimitive } from "@base-ui/react/button";
2
+ import { type VariantProps } from "class-variance-authority";
3
+ declare const buttonVariants: (props?: ({
4
+ variant?: "link" | "destructive" | "default" | "outline" | "secondary" | "ghost" | "warning" | "accent" | null | undefined;
5
+ size?: "default" | "sm" | "lg" | "icon" | "xs" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
+ declare function Button({ className, variant, size, ...props }: ButtonPrimitive.Props & VariantProps<typeof buttonVariants>): import("react/jsx-runtime").JSX.Element;
8
+ export { Button, buttonVariants };
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ declare function Card({ className, size, ...props }: React.ComponentProps<"div"> & {
3
+ size?: "default" | "sm";
4
+ }): import("react/jsx-runtime").JSX.Element;
5
+ declare function CardHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
6
+ declare function CardTitle({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
7
+ declare function CardDescription({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
8
+ declare function CardAction({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
9
+ declare function CardContent({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
10
+ declare function CardFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
11
+ export { Card, CardHeader, CardFooter, CardTitle, CardAction, CardDescription, CardContent, };
@@ -0,0 +1,3 @@
1
+ import { Checkbox as CheckboxPrimitive } from "@base-ui/react/checkbox";
2
+ declare function Checkbox({ className, ...props }: CheckboxPrimitive.Root.Props): import("react/jsx-runtime").JSX.Element;
3
+ export { Checkbox };
@@ -0,0 +1,5 @@
1
+ import { Collapsible as CollapsiblePrimitive } from "@base-ui/react/collapsible";
2
+ declare function Collapsible({ ...props }: CollapsiblePrimitive.Root.Props): import("react/jsx-runtime").JSX.Element;
3
+ declare function CollapsibleTrigger({ ...props }: CollapsiblePrimitive.Trigger.Props): import("react/jsx-runtime").JSX.Element;
4
+ declare function CollapsibleContent({ ...props }: CollapsiblePrimitive.Panel.Props): import("react/jsx-runtime").JSX.Element;
5
+ export { Collapsible, CollapsibleTrigger, CollapsibleContent };
@@ -0,0 +1,19 @@
1
+ import * as React from "react";
2
+ import { Command as CommandPrimitive } from "cmdk";
3
+ import { Dialog } from "./dialog";
4
+ declare function Command({ className, ...props }: React.ComponentProps<typeof CommandPrimitive>): import("react/jsx-runtime").JSX.Element;
5
+ declare function CommandDialog({ title, description, children, className, showCloseButton, ...props }: Omit<React.ComponentProps<typeof Dialog>, "children"> & {
6
+ title?: string;
7
+ description?: string;
8
+ className?: string;
9
+ showCloseButton?: boolean;
10
+ children: React.ReactNode;
11
+ }): import("react/jsx-runtime").JSX.Element;
12
+ declare function CommandInput({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Input>): import("react/jsx-runtime").JSX.Element;
13
+ declare function CommandList({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.List>): import("react/jsx-runtime").JSX.Element;
14
+ declare function CommandEmpty({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Empty>): import("react/jsx-runtime").JSX.Element;
15
+ declare function CommandGroup({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
16
+ declare function CommandSeparator({ className, ...props }: React.ComponentProps<typeof CommandPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
17
+ declare function CommandItem({ className, children, ...props }: React.ComponentProps<typeof CommandPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
18
+ declare function CommandShortcut({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
19
+ export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
@@ -0,0 +1,17 @@
1
+ import * as React from "react";
2
+ import { Dialog as DialogPrimitive } from "@base-ui/react/dialog";
3
+ declare function Dialog({ ...props }: DialogPrimitive.Root.Props): import("react/jsx-runtime").JSX.Element;
4
+ declare function DialogTrigger({ ...props }: DialogPrimitive.Trigger.Props): import("react/jsx-runtime").JSX.Element;
5
+ declare function DialogPortal({ ...props }: DialogPrimitive.Portal.Props): import("react/jsx-runtime").JSX.Element;
6
+ declare function DialogClose({ ...props }: DialogPrimitive.Close.Props): import("react/jsx-runtime").JSX.Element;
7
+ declare function DialogOverlay({ className, ...props }: DialogPrimitive.Backdrop.Props): import("react/jsx-runtime").JSX.Element;
8
+ declare function DialogContent({ className, children, showCloseButton, ...props }: DialogPrimitive.Popup.Props & {
9
+ showCloseButton?: boolean;
10
+ }): import("react/jsx-runtime").JSX.Element;
11
+ declare function DialogHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
12
+ declare function DialogFooter({ className, showCloseButton, children, ...props }: React.ComponentProps<"div"> & {
13
+ showCloseButton?: boolean;
14
+ }): import("react/jsx-runtime").JSX.Element;
15
+ declare function DialogTitle({ className, ...props }: DialogPrimitive.Title.Props): import("react/jsx-runtime").JSX.Element;
16
+ declare function DialogDescription({ className, ...props }: DialogPrimitive.Description.Props): import("react/jsx-runtime").JSX.Element;
17
+ export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, };
@@ -0,0 +1,29 @@
1
+ import * as React from "react";
2
+ import { Menu as MenuPrimitive } from "@base-ui/react/menu";
3
+ declare function DropdownMenu({ ...props }: MenuPrimitive.Root.Props): import("react/jsx-runtime").JSX.Element;
4
+ declare function DropdownMenuPortal({ ...props }: MenuPrimitive.Portal.Props): import("react/jsx-runtime").JSX.Element;
5
+ declare function DropdownMenuTrigger({ ...props }: MenuPrimitive.Trigger.Props): import("react/jsx-runtime").JSX.Element;
6
+ declare function DropdownMenuContent({ align, alignOffset, side, sideOffset, className, ...props }: MenuPrimitive.Popup.Props & Pick<MenuPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">): import("react/jsx-runtime").JSX.Element;
7
+ declare function DropdownMenuGroup({ ...props }: MenuPrimitive.Group.Props): import("react/jsx-runtime").JSX.Element;
8
+ declare function DropdownMenuLabel({ className, inset, ...props }: MenuPrimitive.GroupLabel.Props & {
9
+ inset?: boolean;
10
+ }): import("react/jsx-runtime").JSX.Element;
11
+ declare function DropdownMenuItem({ className, inset, variant, ...props }: MenuPrimitive.Item.Props & {
12
+ inset?: boolean;
13
+ variant?: "default" | "destructive";
14
+ }): import("react/jsx-runtime").JSX.Element;
15
+ declare function DropdownMenuSub({ ...props }: MenuPrimitive.SubmenuRoot.Props): import("react/jsx-runtime").JSX.Element;
16
+ declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: MenuPrimitive.SubmenuTrigger.Props & {
17
+ inset?: boolean;
18
+ }): import("react/jsx-runtime").JSX.Element;
19
+ declare function DropdownMenuSubContent({ align, alignOffset, side, sideOffset, className, ...props }: React.ComponentProps<typeof DropdownMenuContent>): import("react/jsx-runtime").JSX.Element;
20
+ declare function DropdownMenuCheckboxItem({ className, children, checked, inset, ...props }: MenuPrimitive.CheckboxItem.Props & {
21
+ inset?: boolean;
22
+ }): import("react/jsx-runtime").JSX.Element;
23
+ declare function DropdownMenuRadioGroup({ ...props }: MenuPrimitive.RadioGroup.Props): import("react/jsx-runtime").JSX.Element;
24
+ declare function DropdownMenuRadioItem({ className, children, inset, ...props }: MenuPrimitive.RadioItem.Props & {
25
+ inset?: boolean;
26
+ }): import("react/jsx-runtime").JSX.Element;
27
+ declare function DropdownMenuSeparator({ className, ...props }: MenuPrimitive.Separator.Props): import("react/jsx-runtime").JSX.Element;
28
+ declare function DropdownMenuShortcut({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
29
+ export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, };