@makinbakin/sdk 0.0.1-rc.3 → 0.0.1-rc.6

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.
@@ -1,6 +1,11 @@
1
- interface AgentSelectProps {
1
+ import type { AriaAttributes } from 'react';
2
+ interface AgentSelectProps extends Pick<AriaAttributes, 'aria-describedby' | 'aria-invalid'> {
3
+ id?: string;
2
4
  value: string;
3
5
  onValueChange: (value: string) => void;
6
+ /** Include the workflow/task runtime assignee token (`$assigned`) */
7
+ includeAssigned?: boolean;
8
+ assignedLabel?: string;
4
9
  /** Show a "None" / "Unassigned" option at the top (default: false) */
5
10
  allowNone?: boolean;
6
11
  /** Label for the none option (default: "Unassigned") */
@@ -11,5 +16,5 @@ interface AgentSelectProps {
11
16
  agentIds?: string[];
12
17
  className?: string;
13
18
  }
14
- export declare function AgentSelect({ value, onValueChange, allowNone, noneLabel, placeholder, agentIds, className, }: AgentSelectProps): import("react/jsx-runtime").JSX.Element;
19
+ export declare function AgentSelect({ value, onValueChange, includeAssigned, assignedLabel, allowNone, noneLabel, placeholder, agentIds, className, id, 'aria-describedby': ariaDescribedBy, 'aria-invalid': ariaInvalid, }: AgentSelectProps): import("react/jsx-runtime").JSX.Element;
15
20
  export {};
@@ -110,6 +110,14 @@ export interface SkillDefinition {
110
110
  output_schema?: Record<string, unknown>;
111
111
  source?: string;
112
112
  }
113
+ export interface WorkflowLayoutInput {
114
+ positions?: Record<string, {
115
+ x: number;
116
+ y: number;
117
+ [key: string]: unknown;
118
+ }>;
119
+ [key: string]: unknown;
120
+ }
113
121
  export interface WorkflowDefinitionInput {
114
122
  /** Stable workflow id. Falls back to slug(name) when omitted. */
115
123
  id?: string;
@@ -117,7 +125,9 @@ export interface WorkflowDefinitionInput {
117
125
  description: string;
118
126
  version: number;
119
127
  inputs?: Record<string, unknown>;
128
+ layout?: WorkflowLayoutInput;
120
129
  steps: unknown[];
130
+ [key: string]: unknown;
121
131
  }
122
132
  export interface ActivityAPI {
123
133
  /** Log a human-readable message to the live activity feed */
@@ -720,6 +730,13 @@ export interface FileBackedContentTypeDefinition extends SearchContentTypeDefini
720
730
  * own initial population (rare).
721
731
  */
722
732
  buildOnStartup?: boolean;
733
+ /**
734
+ * Keep indexed documents that are not represented by a matched file when
735
+ * verifyExists(key) still returns true. Use this only for hybrid content
736
+ * types that combine file-backed rows with registry/runtime rows in the
737
+ * same table.
738
+ */
739
+ preserveVirtualDocuments?: boolean;
723
740
  }
724
741
  /** Search API provided to plugins via ctx.search */
725
742
  export interface SearchAPI {
@@ -18087,23 +18087,40 @@ import { jsxDEV as jsxDEV6 } from "react/jsx-dev-runtime";
18087
18087
  function AgentSelect({
18088
18088
  value,
18089
18089
  onValueChange,
18090
+ includeAssigned = false,
18091
+ assignedLabel = "Assigned agent",
18090
18092
  allowNone = false,
18091
18093
  noneLabel = "Unassigned",
18092
18094
  placeholder = "Select agent...",
18093
18095
  agentIds,
18094
- className
18096
+ className,
18097
+ id,
18098
+ "aria-describedby": ariaDescribedBy,
18099
+ "aria-invalid": ariaInvalid
18095
18100
  }) {
18096
18101
  const allAgents = useAgentList();
18097
18102
  const agents = agentIds ? allAgents.filter((a) => agentIds.includes(a.id)) : allAgents;
18103
+ const isAssignedToken = value === "$assigned";
18098
18104
  return /* @__PURE__ */ jsxDEV6(Select, {
18099
18105
  value,
18100
18106
  onValueChange: (v) => onValueChange(v ?? ""),
18101
18107
  children: [
18102
18108
  /* @__PURE__ */ jsxDEV6(SelectTrigger3, {
18109
+ id,
18103
18110
  className,
18111
+ "aria-describedby": ariaDescribedBy,
18112
+ "aria-invalid": ariaInvalid,
18104
18113
  children: /* @__PURE__ */ jsxDEV6(SelectValue3, {
18105
18114
  placeholder,
18106
- children: value ? /* @__PURE__ */ jsxDEV6("span", {
18115
+ children: isAssignedToken ? /* @__PURE__ */ jsxDEV6("span", {
18116
+ className: "flex items-center gap-2",
18117
+ children: [
18118
+ /* @__PURE__ */ jsxDEV6(User, {
18119
+ className: "size-3.5 text-blue-400"
18120
+ }, undefined, false, undefined, this),
18121
+ assignedLabel
18122
+ ]
18123
+ }, undefined, true, undefined, this) : value ? /* @__PURE__ */ jsxDEV6("span", {
18107
18124
  className: "flex items-center gap-2",
18108
18125
  children: [
18109
18126
  /* @__PURE__ */ jsxDEV6(AgentAvatar, {
@@ -18121,6 +18138,15 @@ function AgentSelect({
18121
18138
  value: "",
18122
18139
  children: noneLabel
18123
18140
  }, undefined, false, undefined, this),
18141
+ includeAssigned && /* @__PURE__ */ jsxDEV6(SelectItem3, {
18142
+ value: "$assigned",
18143
+ children: [
18144
+ /* @__PURE__ */ jsxDEV6(User, {
18145
+ className: "size-3.5 text-blue-400"
18146
+ }, undefined, false, undefined, this),
18147
+ assignedLabel
18148
+ ]
18149
+ }, undefined, true, undefined, this),
18124
18150
  agents.map((a) => /* @__PURE__ */ jsxDEV6(SelectItem3, {
18125
18151
  value: a.id,
18126
18152
  children: [
@@ -39748,7 +39774,7 @@ function Switch({
39748
39774
  return /* @__PURE__ */ jsxDEV34(exports_index_parts7.Root, {
39749
39775
  "data-slot": "switch",
39750
39776
  "data-size": size4,
39751
- className: cn("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50", className),
39777
+ className: cn("peer group/switch relative inline-flex shrink-0 cursor-pointer items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 after:cursor-pointer focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50 data-disabled:after:cursor-not-allowed", className),
39752
39778
  ...props,
39753
39779
  children: /* @__PURE__ */ jsxDEV34(exports_index_parts7.Thumb, {
39754
39780
  "data-slot": "switch-thumb",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@makinbakin/sdk",
3
- "version": "0.0.1-rc.3",
3
+ "version": "0.0.1-rc.6",
4
4
  "description": "SDK for building Bakin plugins — UI components, slot types, hooks, and the runtime registerPlugin helper.",
5
5
  "type": "module",
6
6
  "sideEffects": false,
package/types/index.d.ts CHANGED
@@ -546,6 +546,7 @@ export interface FileBackedContentTypeDefinition extends SearchContentTypeDefini
546
546
  onSync?: (relPath: string, content: string) => Promise<void>;
547
547
  onUnlink?: (relPath: string) => Promise<void>;
548
548
  buildOnStartup?: boolean;
549
+ preserveVirtualDocuments?: boolean;
549
550
  }
550
551
  export interface SearchQueryParams {
551
552
  q: string;
@@ -683,13 +684,23 @@ export interface SkillDefinition {
683
684
  output_schema?: Record<string, unknown>;
684
685
  source?: string;
685
686
  }
687
+ export interface WorkflowLayoutInput {
688
+ positions?: Record<string, {
689
+ x: number;
690
+ y: number;
691
+ [key: string]: unknown;
692
+ }>;
693
+ [key: string]: unknown;
694
+ }
686
695
  export interface WorkflowDefinitionInput {
687
696
  id?: string;
688
697
  name: string;
689
698
  description: string;
690
699
  version: number;
691
700
  inputs?: Record<string, unknown>;
701
+ layout?: WorkflowLayoutInput;
692
702
  steps: unknown[];
703
+ [key: string]: unknown;
693
704
  }
694
705
  export type FormFieldType = 'string' | 'text' | 'number' | 'boolean' | 'select' | 'agent' | 'skill' | 'list';
695
706
  export interface FormField {
package/ui/index.js CHANGED
@@ -26569,7 +26569,7 @@ function Switch({
26569
26569
  return /* @__PURE__ */ jsxDEV21(exports_index_parts10.Root, {
26570
26570
  "data-slot": "switch",
26571
26571
  "data-size": size4,
26572
- className: cn("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50", className),
26572
+ className: cn("peer group/switch relative inline-flex shrink-0 cursor-pointer items-center rounded-full border border-transparent transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 after:cursor-pointer focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50 data-disabled:after:cursor-not-allowed", className),
26573
26573
  ...props,
26574
26574
  children: /* @__PURE__ */ jsxDEV21(exports_index_parts10.Thumb, {
26575
26575
  "data-slot": "switch-thumb",