@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.
- package/README.md +107 -0
- package/_internal/app/components/agent-avatar.d.ts +11 -0
- package/_internal/app/components/agent-filter.d.ts +8 -0
- package/_internal/app/components/agent-select.d.ts +15 -0
- package/_internal/app/components/agent-status.d.ts +8 -0
- package/_internal/app/components/bakin-drawer.d.ts +23 -0
- package/_internal/app/components/color-picker.d.ts +7 -0
- package/_internal/app/components/empty-state.d.ts +10 -0
- package/_internal/app/components/error-banner.d.ts +6 -0
- package/_internal/app/components/error-state.d.ts +8 -0
- package/_internal/app/components/facet-filter.d.ts +17 -0
- package/_internal/app/components/integrated-brainstorm/collapsed-header.d.ts +14 -0
- package/_internal/app/components/integrated-brainstorm/empty-state.d.ts +5 -0
- package/_internal/app/components/integrated-brainstorm/index.d.ts +3 -0
- package/_internal/app/components/integrated-brainstorm/input-row.d.ts +16 -0
- package/_internal/app/components/integrated-brainstorm/message-list.d.ts +8 -0
- package/_internal/app/components/integrated-brainstorm/thinking-indicator.d.ts +19 -0
- package/_internal/app/components/integrated-brainstorm/types.d.ts +61 -0
- package/_internal/app/components/integrated-brainstorm/use-auto-grow.d.ts +6 -0
- package/_internal/app/components/integrated-brainstorm/use-brainstorm-state.d.ts +21 -0
- package/_internal/app/components/markdown-content.d.ts +3 -0
- package/_internal/app/components/markdown-editor.d.ts +11 -0
- package/_internal/app/components/model-select.d.ts +9 -0
- package/_internal/app/components/page-layout.d.ts +9 -0
- package/_internal/app/components/plugin-header.d.ts +16 -0
- package/_internal/app/components/plugin-settings-renderer.d.ts +9 -0
- package/_internal/app/components/sortable-head.d.ts +13 -0
- package/_internal/app/components/ui/alert.d.ts +10 -0
- package/_internal/app/components/ui/avatar.d.ts +11 -0
- package/_internal/app/components/ui/badge.d.ts +7 -0
- package/_internal/app/components/ui/button.d.ts +8 -0
- package/_internal/app/components/ui/card.d.ts +11 -0
- package/_internal/app/components/ui/checkbox.d.ts +3 -0
- package/_internal/app/components/ui/collapsible.d.ts +5 -0
- package/_internal/app/components/ui/command.d.ts +19 -0
- package/_internal/app/components/ui/dialog.d.ts +17 -0
- package/_internal/app/components/ui/dropdown-menu.d.ts +29 -0
- package/_internal/app/components/ui/form.d.ts +23 -0
- package/_internal/app/components/ui/input-group.d.ts +18 -0
- package/_internal/app/components/ui/input.d.ts +3 -0
- package/_internal/app/components/ui/label.d.ts +3 -0
- package/_internal/app/components/ui/popover.d.ts +9 -0
- package/_internal/app/components/ui/progress.d.ts +7 -0
- package/_internal/app/components/ui/select.d.ts +15 -0
- package/_internal/app/components/ui/separator.d.ts +3 -0
- package/_internal/app/components/ui/sheet.d.ts +14 -0
- package/_internal/app/components/ui/skeleton.d.ts +2 -0
- package/_internal/app/components/ui/switch.d.ts +5 -0
- package/_internal/app/components/ui/table.d.ts +10 -0
- package/_internal/app/components/ui/tabs.d.ts +10 -0
- package/_internal/app/components/ui/textarea.d.ts +3 -0
- package/_internal/app/components/ui/tooltip.d.ts +6 -0
- package/_internal/app/components/underline-tabs.d.ts +15 -0
- package/_internal/app/hooks/use-assets.d.ts +25 -0
- package/_internal/app/hooks/use-content-store.d.ts +36 -0
- package/_internal/app/hooks/use-debug.d.ts +1 -0
- package/_internal/app/hooks/use-form-guard.d.ts +5 -0
- package/_internal/app/hooks/use-query-state.d.ts +14 -0
- package/_internal/app/hooks/use-runtime-status.d.ts +12 -0
- package/_internal/app/hooks/use-schedule.d.ts +63 -0
- package/_internal/app/hooks/use-search.d.ts +65 -0
- package/_internal/app/hooks/use-sidebar.d.ts +4 -0
- package/_internal/app/hooks/use-sse.d.ts +1 -0
- package/_internal/app/hooks/use-toast.d.ts +16 -0
- package/_internal/app/hooks/use-vertical-resize.d.ts +22 -0
- package/_internal/app/lib/browser-notify.d.ts +5 -0
- package/_internal/app/lib/map-audit-message.d.ts +7 -0
- package/_internal/app/lib/utils.d.ts +2 -0
- package/_internal/app/types/index.d.ts +126 -0
- package/_internal/core/adapters/runtime/capabilities.d.ts +2 -0
- package/_internal/core/adapters/runtime/concepts.d.ts +458 -0
- package/_internal/core/adapters/runtime/helpers.d.ts +5 -0
- package/_internal/core/adapters/runtime/index.d.ts +5 -0
- package/_internal/core/adapters/shared.d.ts +37 -0
- package/_internal/core/docs/index.d.ts +2 -0
- package/_internal/core/docs/metadata.d.ts +92 -0
- package/_internal/core/docs/route.d.ts +9 -0
- package/_internal/core/format.d.ts +6 -0
- package/_internal/core/openapi/errors.d.ts +29 -0
- package/_internal/core/openapi/zod-to-openapi.d.ts +14 -0
- package/_internal/core/plugin-types.d.ts +849 -0
- package/_internal/core/routing/define.d.ts +34 -0
- package/_internal/core/routing/dispatcher.d.ts +44 -0
- package/_internal/core/routing/index.d.ts +15 -0
- package/_internal/core/routing/operation-id.d.ts +9 -0
- package/_internal/core/routing/registry.d.ts +52 -0
- package/_internal/core/routing/search-route.d.ts +26 -0
- package/_internal/core/routing/types.d.ts +123 -0
- package/_internal/plugins/team/hooks/use-agent-store.d.ts +49 -0
- package/_internal/plugins/team/types.d.ts +131 -0
- package/_internal/plugins/workflows/hooks/channel-icon.d.ts +6 -0
- package/_internal/plugins/workflows/hooks/use-notification-channels.d.ts +13 -0
- package/_internal/plugins/workflows/lib/notification-channel-registry.d.ts +26 -0
- package/components/index.d.ts +33 -0
- package/components/index.js +39522 -0
- package/hooks/index.d.ts +25 -0
- package/hooks/index.js +1738 -0
- package/hooks/router.d.ts +38 -0
- package/index.d.ts +27 -0
- package/index.js +13917 -0
- package/metadata/index.d.ts +16 -0
- package/metadata/index.js +31 -0
- package/package.json +88 -0
- package/register.d.ts +103 -0
- package/routing/index.d.ts +11 -0
- package/routing/index.js +13721 -0
- package/slots/index.d.ts +55 -0
- package/slots/index.js +92 -0
- package/types/index.d.ts +840 -0
- package/types/index.js +1 -0
- package/ui/index.d.ts +34 -0
- package/ui/index.js +28713 -0
- package/utils/index.d.ts +9 -0
- package/utils/index.js +1832 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type ControllerProps, type FieldPath, type FieldValues } from "react-hook-form";
|
|
3
|
+
import { Label } from "./label";
|
|
4
|
+
declare const Form: <TFieldValues extends FieldValues, TContext = any, TTransformedValues = TFieldValues>(props: import("react-hook-form").FormProviderProps<TFieldValues, TContext, TTransformedValues>) => React.JSX.Element;
|
|
5
|
+
declare function FormField<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>({ ...props }: ControllerProps<TFieldValues, TName>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function useFormField(): {
|
|
7
|
+
invalid: boolean;
|
|
8
|
+
isDirty: boolean;
|
|
9
|
+
isTouched: boolean;
|
|
10
|
+
isValidating: boolean;
|
|
11
|
+
error?: import("react-hook-form").FieldError;
|
|
12
|
+
id: string;
|
|
13
|
+
name: string;
|
|
14
|
+
formItemId: string;
|
|
15
|
+
formDescriptionId: string;
|
|
16
|
+
formMessageId: string;
|
|
17
|
+
};
|
|
18
|
+
declare function FormItem({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
declare function FormLabel({ className, ...props }: React.ComponentProps<typeof Label>): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
declare function FormControl({ ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
declare function FormDescription({ className, ...props }: React.ComponentProps<"p">): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
declare function FormMessage({ className, children, ...props }: React.ComponentProps<"p">): import("react/jsx-runtime").JSX.Element | null;
|
|
23
|
+
export { useFormField, Form, FormItem, FormLabel, FormControl, FormDescription, FormMessage, FormField, };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
import { Button } from "./button";
|
|
4
|
+
declare function InputGroup({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare const inputGroupAddonVariants: (props?: ({
|
|
6
|
+
align?: "inline-end" | "inline-start" | "block-start" | "block-end" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
declare function InputGroupAddon({ className, align, ...props }: React.ComponentProps<"div"> & VariantProps<typeof inputGroupAddonVariants>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare const inputGroupButtonVariants: (props?: ({
|
|
10
|
+
size?: "sm" | "xs" | "icon-xs" | "icon-sm" | null | undefined;
|
|
11
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
|
+
declare function InputGroupButton({ className, type, variant, size, ...props }: Omit<React.ComponentProps<typeof Button>, "size" | "type"> & VariantProps<typeof inputGroupButtonVariants> & {
|
|
13
|
+
type?: "button" | "submit" | "reset";
|
|
14
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare function InputGroupText({ className, ...props }: React.ComponentProps<"span">): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
declare function InputGroupInput({ className, ...props }: React.ComponentProps<"input">): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
declare function InputGroupTextarea({ className, ...props }: React.ComponentProps<"textarea">): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupText, InputGroupInput, InputGroupTextarea, };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Popover as PopoverPrimitive } from "@base-ui/react/popover";
|
|
3
|
+
declare function Popover({ ...props }: PopoverPrimitive.Root.Props): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function PopoverTrigger({ ...props }: PopoverPrimitive.Trigger.Props): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function PopoverContent({ className, align, alignOffset, side, sideOffset, ...props }: PopoverPrimitive.Popup.Props & Pick<PopoverPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function PopoverHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function PopoverTitle({ className, ...props }: PopoverPrimitive.Title.Props): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function PopoverDescription({ className, ...props }: PopoverPrimitive.Description.Props): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export { Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger, };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Progress as ProgressPrimitive } from "@base-ui/react/progress";
|
|
2
|
+
declare function Progress({ className, children, value, ...props }: ProgressPrimitive.Root.Props): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function ProgressTrack({ className, ...props }: ProgressPrimitive.Track.Props): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function ProgressIndicator({ className, ...props }: ProgressPrimitive.Indicator.Props): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function ProgressLabel({ className, ...props }: ProgressPrimitive.Label.Props): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function ProgressValue({ className, ...props }: ProgressPrimitive.Value.Props): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export { Progress, ProgressTrack, ProgressIndicator, ProgressLabel, ProgressValue, };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Select as SelectPrimitive } from "@base-ui/react/select";
|
|
3
|
+
declare const Select: typeof SelectPrimitive.Root;
|
|
4
|
+
declare function SelectGroup({ className, ...props }: SelectPrimitive.Group.Props): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function SelectValue({ className, ...props }: SelectPrimitive.Value.Props): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function SelectTrigger({ className, size, children, ...props }: SelectPrimitive.Trigger.Props & {
|
|
7
|
+
size?: "sm" | "default";
|
|
8
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function SelectContent({ className, children, side, sideOffset, align, alignOffset, alignItemWithTrigger, ...props }: SelectPrimitive.Popup.Props & Pick<SelectPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset" | "alignItemWithTrigger">): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function SelectLabel({ className, ...props }: SelectPrimitive.GroupLabel.Props): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function SelectItem({ className, children, ...props }: SelectPrimitive.Item.Props): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function SelectSeparator({ className, ...props }: SelectPrimitive.Separator.Props): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollUpArrow>): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
declare function SelectScrollDownButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollDownArrow>): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Dialog as SheetPrimitive } from "@base-ui/react/dialog";
|
|
3
|
+
declare function Sheet({ ...props }: SheetPrimitive.Root.Props): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function SheetTrigger({ ...props }: SheetPrimitive.Trigger.Props): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function SheetClose({ ...props }: SheetPrimitive.Close.Props): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function SheetContent({ className, children, side, showCloseButton, ...props }: SheetPrimitive.Popup.Props & {
|
|
7
|
+
side?: "top" | "right" | "bottom" | "left";
|
|
8
|
+
showCloseButton?: boolean;
|
|
9
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function SheetHeader({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare function SheetFooter({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare function SheetTitle({ className, ...props }: SheetPrimitive.Title.Props): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare function SheetDescription({ className, ...props }: SheetPrimitive.Description.Props): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export { Sheet, SheetTrigger, SheetClose, SheetContent, SheetHeader, SheetFooter, SheetTitle, SheetDescription, };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
declare function Table({ className, ...props }: React.ComponentProps<"table">): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function TableHeader({ className, ...props }: React.ComponentProps<"thead">): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function TableBody({ className, ...props }: React.ComponentProps<"tbody">): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function TableFooter({ className, ...props }: React.ComponentProps<"tfoot">): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function TableRow({ className, ...props }: React.ComponentProps<"tr">): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function TableHead({ className, ...props }: React.ComponentProps<"th">): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function TableCell({ className, ...props }: React.ComponentProps<"td">): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function TableCaption({ className, ...props }: React.ComponentProps<"caption">): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Tabs as TabsPrimitive } from "@base-ui/react/tabs";
|
|
2
|
+
import { type VariantProps } from "class-variance-authority";
|
|
3
|
+
declare function Tabs({ className, orientation, ...props }: TabsPrimitive.Root.Props): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare const tabsListVariants: (props?: ({
|
|
5
|
+
variant?: "default" | "line" | null | undefined;
|
|
6
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
7
|
+
declare function TabsList({ className, variant, ...props }: TabsPrimitive.List.Props & VariantProps<typeof tabsListVariants>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function TabsTrigger({ className, ...props }: TabsPrimitive.Tab.Props): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function TabsContent({ className, ...props }: TabsPrimitive.Panel.Props): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip";
|
|
2
|
+
declare function TooltipProvider({ delay, ...props }: TooltipPrimitive.Provider.Props): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function Tooltip({ ...props }: TooltipPrimitive.Root.Props): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function TooltipTrigger({ ...props }: TooltipPrimitive.Trigger.Props): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function TooltipContent({ className, side, sideOffset, align, alignOffset, children, ...props }: TooltipPrimitive.Popup.Props & Pick<TooltipPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface UnderlineTab {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
interface UnderlineTabsProps {
|
|
8
|
+
tabs: readonly UnderlineTab[];
|
|
9
|
+
value: string;
|
|
10
|
+
onValueChange: (id: string) => void;
|
|
11
|
+
className?: string;
|
|
12
|
+
rightSlot?: ReactNode;
|
|
13
|
+
}
|
|
14
|
+
export declare function UnderlineTabs({ tabs, value, onValueChange, className, rightSlot }: UnderlineTabsProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { AssetMeta, TrashedAssetMeta } from '../types';
|
|
2
|
+
interface UseAssetsOptions {
|
|
3
|
+
type?: string;
|
|
4
|
+
agent?: string;
|
|
5
|
+
taskId?: string;
|
|
6
|
+
tag?: string;
|
|
7
|
+
limit?: number;
|
|
8
|
+
offset?: number;
|
|
9
|
+
}
|
|
10
|
+
export declare function useAssets(options?: UseAssetsOptions): {
|
|
11
|
+
assets: AssetMeta[];
|
|
12
|
+
total: number;
|
|
13
|
+
loading: boolean;
|
|
14
|
+
refresh: () => Promise<void>;
|
|
15
|
+
deleteAsset: (filename: string) => Promise<boolean>;
|
|
16
|
+
};
|
|
17
|
+
export declare function useTrash(): {
|
|
18
|
+
items: TrashedAssetMeta[];
|
|
19
|
+
loading: boolean;
|
|
20
|
+
refresh: () => Promise<void>;
|
|
21
|
+
restoreAsset: (filename: string) => Promise<boolean>;
|
|
22
|
+
permanentDeleteAsset: (filename: string) => Promise<boolean>;
|
|
23
|
+
emptyTrash: () => Promise<boolean>;
|
|
24
|
+
};
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { ActivityEvent, ContentState, Heartbeat } from '../types';
|
|
2
|
+
interface AuditEntry {
|
|
3
|
+
ts: string;
|
|
4
|
+
event: string;
|
|
5
|
+
agent: string;
|
|
6
|
+
data: Record<string, unknown>;
|
|
7
|
+
}
|
|
8
|
+
interface ReindexProgressEntry {
|
|
9
|
+
indexed: number;
|
|
10
|
+
done: boolean;
|
|
11
|
+
}
|
|
12
|
+
interface ContentStore extends ContentState {
|
|
13
|
+
loading: boolean;
|
|
14
|
+
auditEntries: AuditEntry[];
|
|
15
|
+
activityEvents: ActivityEvent[];
|
|
16
|
+
sseConnected: boolean;
|
|
17
|
+
taskboardVersion: number;
|
|
18
|
+
debug: boolean;
|
|
19
|
+
reindexProgress: Record<string, ReindexProgressEntry>;
|
|
20
|
+
setFiles: (files: Record<string, string>) => void;
|
|
21
|
+
updateFile: (key: string, content: string) => void;
|
|
22
|
+
setHeartbeats: (heartbeats: Record<string, Heartbeat>) => void;
|
|
23
|
+
setConnected: (connected: boolean) => void;
|
|
24
|
+
appendAuditEntry: (entry: AuditEntry) => void;
|
|
25
|
+
appendActivityEvent: (event: ActivityEvent) => void;
|
|
26
|
+
setActivityEvents: (events: ActivityEvent[]) => void;
|
|
27
|
+
setSseConnected: (connected: boolean) => void;
|
|
28
|
+
bumpTaskboard: () => void;
|
|
29
|
+
setDebug: (debug: boolean) => void;
|
|
30
|
+
toggleDebug: () => void;
|
|
31
|
+
setReindexProgress: (table: string, indexed: number, done: boolean) => void;
|
|
32
|
+
clearReindexProgress: () => void;
|
|
33
|
+
initialize: () => Promise<void>;
|
|
34
|
+
}
|
|
35
|
+
export declare const useContentStore: import("zustand").UseBoundStore<import("zustand").StoreApi<ContentStore>>;
|
|
36
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useDebug(): [debug: boolean, toggleDebug: () => void];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Syncs a single string value to a URL query parameter.
|
|
3
|
+
* Returns [value, setValue, pushValue] like useState.
|
|
4
|
+
* - setValue uses router.replace (no history entry) — good for filters, search, view toggles
|
|
5
|
+
* - pushValue uses router.push (creates history entry) — good for opening drawers/modals
|
|
6
|
+
* When value equals defaultValue, the param is removed from the URL.
|
|
7
|
+
*/
|
|
8
|
+
export declare function useQueryState(key: string, defaultValue?: string): [string, (v: string) => void, (v: string) => void];
|
|
9
|
+
/**
|
|
10
|
+
* Syncs a string[] to a URL query parameter (comma-separated).
|
|
11
|
+
* Returns [values, setValues] like useState.
|
|
12
|
+
* When array is empty, the param is removed from the URL.
|
|
13
|
+
*/
|
|
14
|
+
export declare function useQueryArrayState(key: string): [string[], (v: string[]) => void];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
interface RuntimeStatus {
|
|
2
|
+
restartNeeded: boolean;
|
|
3
|
+
restarting: boolean;
|
|
4
|
+
restart: () => Promise<void>;
|
|
5
|
+
markDirty: () => void;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Check if the active runtime needs a restart after config changes.
|
|
9
|
+
* Shared across agent detail, models page, and team grid.
|
|
10
|
+
*/
|
|
11
|
+
export declare function useRuntimeStatus(): RuntimeStatus;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export interface ScheduleJob {
|
|
2
|
+
id: string;
|
|
3
|
+
displayName: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
agentId?: string;
|
|
6
|
+
humanSchedule: string;
|
|
7
|
+
cron?: string;
|
|
8
|
+
paused: boolean;
|
|
9
|
+
pauseReason?: string;
|
|
10
|
+
pauseUntil?: string;
|
|
11
|
+
skipNextN?: number;
|
|
12
|
+
skippedCount?: number;
|
|
13
|
+
enabled: boolean;
|
|
14
|
+
isBakinJob: boolean;
|
|
15
|
+
source?: 'bakin' | 'runtime' | 'adopted';
|
|
16
|
+
canAdopt?: boolean;
|
|
17
|
+
canRestoreNative?: boolean;
|
|
18
|
+
allowOverlap: boolean;
|
|
19
|
+
maxFailures: number;
|
|
20
|
+
consecutiveFailures: number;
|
|
21
|
+
requireTriage?: boolean;
|
|
22
|
+
owner?: string;
|
|
23
|
+
workflowId?: string;
|
|
24
|
+
taskPrompt?: string;
|
|
25
|
+
taskTitle?: string;
|
|
26
|
+
toolsAllow?: string[];
|
|
27
|
+
toolsAllowMissing?: boolean;
|
|
28
|
+
tz?: string;
|
|
29
|
+
lastTaskId?: string;
|
|
30
|
+
nextRun?: string;
|
|
31
|
+
lastRun?: string;
|
|
32
|
+
createdAt?: string;
|
|
33
|
+
updatedAt?: string;
|
|
34
|
+
}
|
|
35
|
+
export interface RunEntry {
|
|
36
|
+
runId: string;
|
|
37
|
+
timestamp: string;
|
|
38
|
+
status: 'success' | 'failure' | 'skipped';
|
|
39
|
+
taskId?: string;
|
|
40
|
+
error?: string;
|
|
41
|
+
}
|
|
42
|
+
interface UseScheduleOptions {
|
|
43
|
+
agent?: string;
|
|
44
|
+
}
|
|
45
|
+
export declare function useScheduleJobs(options?: UseScheduleOptions): {
|
|
46
|
+
jobs: ScheduleJob[];
|
|
47
|
+
loading: boolean;
|
|
48
|
+
refresh: () => Promise<void>;
|
|
49
|
+
pauseJob: (jobId: string, pauseUntil?: string) => Promise<boolean>;
|
|
50
|
+
resumeJob: (jobId: string) => Promise<boolean>;
|
|
51
|
+
deleteJob: (jobId: string) => Promise<boolean>;
|
|
52
|
+
runNow: (jobId: string) => Promise<boolean>;
|
|
53
|
+
updateJob: (jobId: string, data: Record<string, unknown>) => Promise<boolean>;
|
|
54
|
+
adoptJob: (jobId: string, data: Record<string, unknown>) => Promise<boolean>;
|
|
55
|
+
restoreNative: (jobId: string) => Promise<boolean>;
|
|
56
|
+
skipNext: (jobId: string, n?: number) => Promise<boolean>;
|
|
57
|
+
duplicateJob: (jobId: string, overrides?: Record<string, unknown>) => Promise<boolean>;
|
|
58
|
+
};
|
|
59
|
+
export declare function useRunHistory(jobId: string | null, limit?: number): {
|
|
60
|
+
runs: RunEntry[];
|
|
61
|
+
loading: boolean;
|
|
62
|
+
};
|
|
63
|
+
export {};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
export interface SearchResult {
|
|
2
|
+
id: string;
|
|
3
|
+
table: string;
|
|
4
|
+
score: number;
|
|
5
|
+
fields: Record<string, unknown>;
|
|
6
|
+
_table?: string;
|
|
7
|
+
/** Per-index score breakdown (e.g. { search: 0.8, embeddings: 0.6 }) */
|
|
8
|
+
indexScores?: Record<string, number>;
|
|
9
|
+
}
|
|
10
|
+
export interface SearchResponse {
|
|
11
|
+
results: SearchResult[];
|
|
12
|
+
aggregations?: Record<string, Array<{
|
|
13
|
+
value: string;
|
|
14
|
+
count: number;
|
|
15
|
+
}>>;
|
|
16
|
+
meta?: {
|
|
17
|
+
query: string;
|
|
18
|
+
total: number;
|
|
19
|
+
took_ms: number;
|
|
20
|
+
source: 'search' | 'fallback';
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export interface UseSearchOptions {
|
|
24
|
+
/**
|
|
25
|
+
* Plugin id to route the query to. When set, the hook fetches
|
|
26
|
+
* `/api/plugins/{plugin}/search?q=...` — the plugin owns its table
|
|
27
|
+
* name and the client never sees the raw `bakin_` prefix. Omit for
|
|
28
|
+
* cross-plugin search, which falls back to `/api/search?q=...`.
|
|
29
|
+
*/
|
|
30
|
+
plugin?: string;
|
|
31
|
+
/** Max results */
|
|
32
|
+
limit?: number;
|
|
33
|
+
/** Facet fields to include aggregation counts for */
|
|
34
|
+
facets?: string[];
|
|
35
|
+
/** Debounce delay in ms (default: 250) */
|
|
36
|
+
debounce?: number;
|
|
37
|
+
/** Fallback filter function when search returns no results or errors */
|
|
38
|
+
fallback?: (query: string) => SearchResult[];
|
|
39
|
+
}
|
|
40
|
+
export interface UseSearchReturn {
|
|
41
|
+
results: SearchResult[];
|
|
42
|
+
aggregations: Record<string, Array<{
|
|
43
|
+
value: string;
|
|
44
|
+
count: number;
|
|
45
|
+
}>>;
|
|
46
|
+
loading: boolean;
|
|
47
|
+
error: string | null;
|
|
48
|
+
meta: SearchResponse['meta'] | null;
|
|
49
|
+
search: (query: string) => void;
|
|
50
|
+
clear: () => void;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Given a client-side filtered list and search results, reorder the list
|
|
54
|
+
* so matched items appear first (by score). Items not in results keep
|
|
55
|
+
* their original order at the end.
|
|
56
|
+
*/
|
|
57
|
+
export declare function reorderBySearchResults<T extends {
|
|
58
|
+
id: string;
|
|
59
|
+
}>(items: T[], searchResults: SearchResult[]): T[];
|
|
60
|
+
/**
|
|
61
|
+
* React hook for Bakin search with debouncing, AbortController, and an
|
|
62
|
+
* optional client-side fallback. Scopes to a plugin via `plugin:` or
|
|
63
|
+
* runs cross-plugin when omitted.
|
|
64
|
+
*/
|
|
65
|
+
export declare function useSearch(options?: UseSearchOptions): UseSearchReturn;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useSSE(): void;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface Toast {
|
|
3
|
+
id: string;
|
|
4
|
+
message: ReactNode;
|
|
5
|
+
type: 'success' | 'error' | 'info';
|
|
6
|
+
duration?: number;
|
|
7
|
+
}
|
|
8
|
+
interface ToastStore {
|
|
9
|
+
toasts: Toast[];
|
|
10
|
+
add: (toast: Omit<Toast, 'id'>) => void;
|
|
11
|
+
dismiss: (id: string) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare const useToastStore: import("zustand").UseBoundStore<import("zustand").StoreApi<ToastStore>>;
|
|
14
|
+
/** Convenience: call from anywhere without hooks */
|
|
15
|
+
export declare function toast(message: ReactNode, type?: Toast['type'], duration?: number): void;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
interface Options {
|
|
2
|
+
defaultHeight: number;
|
|
3
|
+
minHeight: number;
|
|
4
|
+
maxHeight: number;
|
|
5
|
+
/** When set, height is persisted in localStorage under `bakin-vresize:${storageKey}`. */
|
|
6
|
+
storageKey?: string;
|
|
7
|
+
}
|
|
8
|
+
interface HandleProps {
|
|
9
|
+
onMouseDown: (e: React.MouseEvent) => void;
|
|
10
|
+
onTouchStart: (e: React.TouchEvent) => void;
|
|
11
|
+
}
|
|
12
|
+
interface Return {
|
|
13
|
+
height: number;
|
|
14
|
+
setHeight: (h: number) => void;
|
|
15
|
+
handleProps: HandleProps;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Resize a panel by dragging its top edge. The handle lives at the top of the
|
|
19
|
+
* element; dragging upward grows the panel, dragging downward shrinks it.
|
|
20
|
+
*/
|
|
21
|
+
export declare function useVerticalResize({ defaultHeight, minHeight, maxHeight, storageKey }: Options): Return;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function isNotificationsSupported(): boolean;
|
|
2
|
+
export declare function isNotificationsEnabled(): boolean;
|
|
3
|
+
export declare function requestNotificationPermission(): Promise<boolean>;
|
|
4
|
+
export declare function toggleNotifications(enabled: boolean): void;
|
|
5
|
+
export declare function sendBrowserNotification(title: string, body: string): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ActivityEvent } from '../types';
|
|
2
|
+
/** Map an audit event name + data into a human-readable message */
|
|
3
|
+
export declare function mapAuditMessage(event: string, data: Record<string, unknown>): string;
|
|
4
|
+
/** Convert an exec tool name like "bakin_exec_foo_bar" into "Foo bar" */
|
|
5
|
+
export declare function humanizeExecName(name: string): string;
|
|
6
|
+
/** Filter out infrastructure noise that isn't useful in the user-facing feed */
|
|
7
|
+
export declare function isNoisyEvent(evt: ActivityEvent): boolean;
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
export interface TaskLogEntry {
|
|
2
|
+
timestamp: string;
|
|
3
|
+
author: string;
|
|
4
|
+
message: string;
|
|
5
|
+
}
|
|
6
|
+
export interface Task {
|
|
7
|
+
id: string;
|
|
8
|
+
title: string;
|
|
9
|
+
agent?: string;
|
|
10
|
+
checked: boolean;
|
|
11
|
+
date?: string;
|
|
12
|
+
blockedReason?: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
log?: TaskLogEntry[];
|
|
15
|
+
}
|
|
16
|
+
export interface TaskColumns {
|
|
17
|
+
inProgress: Task[];
|
|
18
|
+
todo: Task[];
|
|
19
|
+
done: Task[];
|
|
20
|
+
blocked: Task[];
|
|
21
|
+
}
|
|
22
|
+
export interface TaskBoard {
|
|
23
|
+
columns: TaskColumns;
|
|
24
|
+
timestamp?: string;
|
|
25
|
+
}
|
|
26
|
+
export type ColumnId = keyof TaskColumns;
|
|
27
|
+
export interface CalendarEvent {
|
|
28
|
+
time?: string;
|
|
29
|
+
text: string;
|
|
30
|
+
}
|
|
31
|
+
export interface CalendarDay {
|
|
32
|
+
date: string;
|
|
33
|
+
label?: string;
|
|
34
|
+
events: CalendarEvent[];
|
|
35
|
+
}
|
|
36
|
+
export interface RecurringEvent {
|
|
37
|
+
schedule: string;
|
|
38
|
+
text: string;
|
|
39
|
+
}
|
|
40
|
+
export interface MemoryEntry {
|
|
41
|
+
type: 'decision' | 'learned' | 'note';
|
|
42
|
+
text: string;
|
|
43
|
+
}
|
|
44
|
+
export interface MemoryDay {
|
|
45
|
+
date: string;
|
|
46
|
+
entries: MemoryEntry[];
|
|
47
|
+
}
|
|
48
|
+
export interface Heartbeat {
|
|
49
|
+
status: 'working' | 'idle' | 'down';
|
|
50
|
+
currentTask?: string;
|
|
51
|
+
timestamp: string;
|
|
52
|
+
}
|
|
53
|
+
export interface ProjectMeta {
|
|
54
|
+
filename: string;
|
|
55
|
+
title: string;
|
|
56
|
+
status?: string;
|
|
57
|
+
content: string;
|
|
58
|
+
}
|
|
59
|
+
export interface AssetVariantMeta {
|
|
60
|
+
role: 'thumbnail' | 'optimized' | 'webp';
|
|
61
|
+
path: string;
|
|
62
|
+
filename: string;
|
|
63
|
+
size: number;
|
|
64
|
+
mimeType: string;
|
|
65
|
+
}
|
|
66
|
+
export interface AssetMeta {
|
|
67
|
+
path: string;
|
|
68
|
+
filename: string;
|
|
69
|
+
type: 'text' | 'images' | 'video' | 'audio' | 'plans' | 'research' | 'pdf' | 'data' | 'other';
|
|
70
|
+
mimeType: string;
|
|
71
|
+
size: number;
|
|
72
|
+
mtimeMs?: number;
|
|
73
|
+
metadata: {
|
|
74
|
+
agent: string;
|
|
75
|
+
taskId: string | null;
|
|
76
|
+
created: string;
|
|
77
|
+
tool?: string;
|
|
78
|
+
description?: string;
|
|
79
|
+
tags?: string[];
|
|
80
|
+
originalFilename?: string;
|
|
81
|
+
};
|
|
82
|
+
variants?: AssetVariantMeta[];
|
|
83
|
+
}
|
|
84
|
+
export interface TrashedAssetMeta {
|
|
85
|
+
filename: string;
|
|
86
|
+
originalFilename: string;
|
|
87
|
+
type: string;
|
|
88
|
+
mimeType: string;
|
|
89
|
+
size: number;
|
|
90
|
+
deletedAt: string;
|
|
91
|
+
expiresAt: string;
|
|
92
|
+
metadata: {
|
|
93
|
+
agent: string;
|
|
94
|
+
taskId: string | null;
|
|
95
|
+
created: string;
|
|
96
|
+
tool?: string;
|
|
97
|
+
description?: string;
|
|
98
|
+
tags?: string[];
|
|
99
|
+
} | null;
|
|
100
|
+
}
|
|
101
|
+
export interface OfficeData {
|
|
102
|
+
asciiMap: string;
|
|
103
|
+
statusTable: {
|
|
104
|
+
agent: string;
|
|
105
|
+
status: string;
|
|
106
|
+
task: string;
|
|
107
|
+
heartbeat: string;
|
|
108
|
+
}[];
|
|
109
|
+
history: string[];
|
|
110
|
+
}
|
|
111
|
+
export interface ActivityEvent {
|
|
112
|
+
id: string;
|
|
113
|
+
ts: string;
|
|
114
|
+
type: 'log' | 'audit' | 'alert';
|
|
115
|
+
agent: string;
|
|
116
|
+
message: string;
|
|
117
|
+
taskId?: string;
|
|
118
|
+
taskTitle?: string;
|
|
119
|
+
eventName?: string;
|
|
120
|
+
duplicate?: boolean;
|
|
121
|
+
}
|
|
122
|
+
export interface ContentState {
|
|
123
|
+
files: Record<string, string>;
|
|
124
|
+
heartbeats: Record<string, Heartbeat>;
|
|
125
|
+
connected: boolean;
|
|
126
|
+
}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export type ChannelCapability = 'message' | 'rich-content' | 'interactive-approval' | 'modal-input' | 'threaded-replies' | 'edit-after-send' | 'cancel-rendered';
|
|
2
|
+
export declare function hasChannelCapability(capabilities: readonly ChannelCapability[], capability: ChannelCapability): boolean;
|