@cadraos/sdk 0.3.9 → 0.3.10
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/dist/chat/index.cjs +0 -4
- package/dist/chat/index.cjs.map +1 -1
- package/dist/chat/index.js +0 -4
- package/dist/chat/index.js.map +1 -1
- package/dist/index.cjs +0 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +0 -4
- package/dist/index.js.map +1 -1
- package/dist/kanban/engine/index.cjs +0 -6
- package/dist/kanban/engine/index.cjs.map +1 -1
- package/dist/kanban/engine/index.js +0 -6
- package/dist/kanban/engine/index.js.map +1 -1
- package/dist/kanban/index.cjs +265 -35
- package/dist/kanban/index.cjs.map +1 -1
- package/dist/kanban/index.d.cts +110 -5
- package/dist/kanban/index.d.ts +110 -5
- package/dist/kanban/index.js +265 -35
- package/dist/kanban/index.js.map +1 -1
- package/dist/teams/index.cjs +0 -4
- package/dist/teams/index.cjs.map +1 -1
- package/dist/teams/index.js +0 -4
- package/dist/teams/index.js.map +1 -1
- package/package.json +1 -1
package/dist/kanban/index.d.cts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Shared kanban types for the @cadraos/sdk/kanban module.
|
|
@@ -1639,6 +1640,11 @@ interface KanbanAdapter {
|
|
|
1639
1640
|
* @returns The updated card.
|
|
1640
1641
|
*/
|
|
1641
1642
|
transitionCard(input: TransitionCardInput): Promise<KanbanCard$1>;
|
|
1643
|
+
/**
|
|
1644
|
+
* Delete a card permanently. OPTIONAL — when absent, the board offers no
|
|
1645
|
+
* delete affordance (back-compat). Server-authorized + org-scoped.
|
|
1646
|
+
*/
|
|
1647
|
+
deleteCard?(cardId: string): Promise<void>;
|
|
1642
1648
|
/**
|
|
1643
1649
|
* Create an `ExecutionStreamController` for a card's run, keyed on the
|
|
1644
1650
|
* card's `executionId`.
|
|
@@ -1711,6 +1717,14 @@ interface LaneAgentPickerProps {
|
|
|
1711
1717
|
* "Only Ava (owner) can change agents". Rendered as text, never a tooltip.
|
|
1712
1718
|
*/
|
|
1713
1719
|
lockedReason?: string;
|
|
1720
|
+
/**
|
|
1721
|
+
* MV3 (optional, additive). When provided AND an agent is `selected`, the
|
|
1722
|
+
* open menu shows an "Edit this agent" footer action; clicking it calls
|
|
1723
|
+
* `onEditAgent(selected.id)` and closes the menu. The HOST owns the edit
|
|
1724
|
+
* surface (e.g. an in-shell sheet) — the picker only fires the intent.
|
|
1725
|
+
* Omit → today's render, unchanged.
|
|
1726
|
+
*/
|
|
1727
|
+
onEditAgent?: (agentId: string) => void;
|
|
1714
1728
|
/** Additional CSS class. */
|
|
1715
1729
|
className?: string;
|
|
1716
1730
|
}
|
|
@@ -1718,7 +1732,7 @@ interface LaneAgentPickerProps {
|
|
|
1718
1732
|
* Render the lane agent picker — interactive for owners, locked-with-reason for
|
|
1719
1733
|
* members.
|
|
1720
1734
|
*/
|
|
1721
|
-
declare function LaneAgentPicker({ selected, options, onSelect, canEdit, lockedReason, className, }: LaneAgentPickerProps): react_jsx_runtime.JSX.Element;
|
|
1735
|
+
declare function LaneAgentPicker({ selected, options, onSelect, canEdit, lockedReason, onEditAgent, className, }: LaneAgentPickerProps): react_jsx_runtime.JSX.Element;
|
|
1722
1736
|
|
|
1723
1737
|
interface KanbanBoardProps {
|
|
1724
1738
|
/** The adapter driving the board (default HTTP or a custom direct adapter). */
|
|
@@ -1793,13 +1807,75 @@ interface KanbanBoardProps {
|
|
|
1793
1807
|
* change it) to re-open after the user closes the drawer.
|
|
1794
1808
|
*/
|
|
1795
1809
|
focusCardId?: string;
|
|
1810
|
+
/**
|
|
1811
|
+
* Replace the built-in `CardDrawer` with a HOST-owned drawer (work-shell v2,
|
|
1812
|
+
* Screen C). When provided, the board renders `renderCardDrawer(ctx)` instead
|
|
1813
|
+
* of its internal drawer whenever a card is selected — the host owns the
|
|
1814
|
+
* tabbed Run/Context/Activity/Steer presentation while the board still owns
|
|
1815
|
+
* selection state (`focusCardId`, click-to-open, close). Absent → today's
|
|
1816
|
+
* internal drawer (M10 back-compat; yobo + the test harness are unchanged).
|
|
1817
|
+
*
|
|
1818
|
+
* The context carries everything the internal drawer receives, so the host
|
|
1819
|
+
* drawer can advance/transition/retry/edit the card and react to run-terminal
|
|
1820
|
+
* exactly as the built-in one does.
|
|
1821
|
+
*/
|
|
1822
|
+
renderCardDrawer?: (ctx: CardDrawerRenderContext) => ReactNode;
|
|
1823
|
+
/**
|
|
1824
|
+
* Enable HTML5 drag-to-move cards between lanes (work-shell v2 / MV4). A card
|
|
1825
|
+
* can only be dropped on a lane reachable by a `manualAllowed` transition from
|
|
1826
|
+
* its current lane — allowed lanes highlight, others refuse the drop. The move
|
|
1827
|
+
* commits through the same `transitionCard` path as the drawer (server
|
|
1828
|
+
* re-validates). OPTIONAL — absent → no drag (today's render, M10). Requires
|
|
1829
|
+
* `enableAdvance` (the transitions that gate drops come from the same source).
|
|
1830
|
+
*/
|
|
1831
|
+
enableDrag?: boolean;
|
|
1796
1832
|
/** Additional CSS class for the board container. */
|
|
1797
1833
|
className?: string;
|
|
1798
1834
|
}
|
|
1835
|
+
/**
|
|
1836
|
+
* Everything a HOST-owned card drawer needs — mirrors the props the built-in
|
|
1837
|
+
* `CardDrawer` receives (work-shell v2 Screen C seam). The board owns selection;
|
|
1838
|
+
* the host owns rendering.
|
|
1839
|
+
*/
|
|
1840
|
+
interface CardDrawerRenderContext {
|
|
1841
|
+
/** The currently open card. */
|
|
1842
|
+
card: KanbanCard$1;
|
|
1843
|
+
/** The adapter (provides `getCard`, the run-stream factory, etc.). */
|
|
1844
|
+
adapter: KanbanAdapter;
|
|
1845
|
+
/** All lanes (for resolving transition target labels + human-gate detection). */
|
|
1846
|
+
lanes: KanbanLane[];
|
|
1847
|
+
/**
|
|
1848
|
+
* The lifecycle's declared edges — filter to `fromLane === card.lane &&
|
|
1849
|
+
* manualAllowed` for the "Move to a step" targets. Undefined when advance is
|
|
1850
|
+
* disabled.
|
|
1851
|
+
*/
|
|
1852
|
+
transitions?: KanbanTransition[];
|
|
1853
|
+
/** Whether the card can be advanced (false in a terminal lane). */
|
|
1854
|
+
canAdvance: boolean;
|
|
1855
|
+
/** Close the drawer (clears the board's selection). */
|
|
1856
|
+
onClose: () => void;
|
|
1857
|
+
/** Re-dispatch a failed card. Absent when the host supplied no `onRetryCard`. */
|
|
1858
|
+
onRetry?: (card: KanbanCard$1) => void;
|
|
1859
|
+
/** Persist an inline title/description edit. Absent when `enableEdit` is false. */
|
|
1860
|
+
onUpdate?: (cardId: string, patch: {
|
|
1861
|
+
title?: string;
|
|
1862
|
+
description?: string;
|
|
1863
|
+
}) => void | Promise<void | unknown>;
|
|
1864
|
+
/** Auto-advance a single-edge lane. Absent when `enableAdvance` is false. */
|
|
1865
|
+
onAdvance?: (cardId: string) => void | Promise<void | unknown>;
|
|
1866
|
+
/** Take a specific manual transition. Absent when `enableAdvance` is false. */
|
|
1867
|
+
onTransition?: (cardId: string, toLane: string) => void | Promise<void | unknown>;
|
|
1868
|
+
/** Delete this card permanently. Absent when the adapter has no `deleteCard`. */
|
|
1869
|
+
onDelete?: (cardId: string) => Promise<boolean>;
|
|
1870
|
+
/** Fired when the card's run reaches a terminal state (host should refetch). */
|
|
1871
|
+
onRunTerminal?: (status: "completed" | "failed") => void;
|
|
1872
|
+
/** Fired on a non-throwing run/board error. */
|
|
1873
|
+
onError?: (message: string) => void;
|
|
1874
|
+
}
|
|
1799
1875
|
/**
|
|
1800
1876
|
* Drop-in agent-first kanban board.
|
|
1801
1877
|
*/
|
|
1802
|
-
declare function KanbanBoard({ adapter, onCreateCard, onRetryCard, onError, onCardCreated, enableCreate, enableEdit, enableAdvance, pollIntervalMs, laneCounts, canEditHandlers, laneAgentPicker, scheduleStatus, focusCardId, className, }: KanbanBoardProps): react_jsx_runtime.JSX.Element;
|
|
1878
|
+
declare function KanbanBoard({ adapter, onCreateCard, onRetryCard, onError, onCardCreated, enableCreate, enableEdit, enableAdvance, pollIntervalMs, laneCounts, canEditHandlers, laneAgentPicker, scheduleStatus, focusCardId, renderCardDrawer, enableDrag, className, }: KanbanBoardProps): react_jsx_runtime.JSX.Element;
|
|
1803
1879
|
|
|
1804
1880
|
/**
|
|
1805
1881
|
* The host's BROWSER-SIDE card source. The host implements these against its
|
|
@@ -1821,6 +1897,8 @@ interface AgentBoardCardSource {
|
|
|
1821
1897
|
}): Promise<KanbanCard$1>;
|
|
1822
1898
|
/** Request a manual transition → host engine validates + advances. */
|
|
1823
1899
|
transitionCard(input: TransitionCardInput): Promise<KanbanCard$1>;
|
|
1900
|
+
/** Delete a card permanently. OPTIONAL — absent → no delete affordance. */
|
|
1901
|
+
deleteCard?(cardId: string): Promise<void>;
|
|
1824
1902
|
/**
|
|
1825
1903
|
* Create an `ExecutionStreamController` for a card's run (the SAME controller
|
|
1826
1904
|
* the chat module uses). Optional — when absent, the drawer falls back to the
|
|
@@ -1895,13 +1973,27 @@ interface KanbanColumnProps {
|
|
|
1895
1973
|
* `canEdit` for `agentPicker` when the slot doesn't set its own.
|
|
1896
1974
|
*/
|
|
1897
1975
|
canEditHandlers?: boolean;
|
|
1976
|
+
/** Make this column's cards draggable sources. */
|
|
1977
|
+
draggableCards?: boolean;
|
|
1978
|
+
/** A drag is in progress somewhere on the board (drives the dimming of
|
|
1979
|
+
* non-target lanes). */
|
|
1980
|
+
dragActive?: boolean;
|
|
1981
|
+
/** This lane is a VALID drop target for the card currently being dragged
|
|
1982
|
+
* (`manualAllowed` from its lane) — highlight + accept the drop. */
|
|
1983
|
+
dropAllowed?: boolean;
|
|
1984
|
+
/** Fired when a card in this column starts being dragged. */
|
|
1985
|
+
onCardDragStart?: (card: KanbanCard$1) => void;
|
|
1986
|
+
/** Fired when a drag ends (drop or cancel). */
|
|
1987
|
+
onCardDragEnd?: () => void;
|
|
1988
|
+
/** Fired when a card is dropped onto this lane (only when `dropAllowed`). */
|
|
1989
|
+
onLaneDrop?: (lane: KanbanLane) => void;
|
|
1898
1990
|
/** Additional CSS class. */
|
|
1899
1991
|
className?: string;
|
|
1900
1992
|
}
|
|
1901
1993
|
/**
|
|
1902
1994
|
* Render a single lane column with its cards.
|
|
1903
1995
|
*/
|
|
1904
|
-
declare function KanbanColumn({ lane, cards, onCardClick, selectedCardId, onCreateCard, showCreate, count, agentPicker, canEditHandlers, className, }: KanbanColumnProps): react_jsx_runtime.JSX.Element;
|
|
1996
|
+
declare function KanbanColumn({ lane, cards, onCardClick, selectedCardId, onCreateCard, showCreate, count, agentPicker, canEditHandlers, draggableCards, dragActive, dropAllowed, onCardDragStart, onCardDragEnd, onLaneDrop, className, }: KanbanColumnProps): react_jsx_runtime.JSX.Element;
|
|
1905
1997
|
|
|
1906
1998
|
/**
|
|
1907
1999
|
* A card's lane-relative schedule state (spec §3a), computed by the column from
|
|
@@ -1925,13 +2017,24 @@ interface KanbanCardProps {
|
|
|
1925
2017
|
* (today's render).
|
|
1926
2018
|
*/
|
|
1927
2019
|
dueState?: DueState;
|
|
2020
|
+
/**
|
|
2021
|
+
* Make this card an HTML5 drag SOURCE (work-shell v2 / MV4). OPTIONAL —
|
|
2022
|
+
* absent → not draggable (today's render, M10). The board decides where a
|
|
2023
|
+
* drop is allowed (only `manualAllowed` targets); the card just reports the
|
|
2024
|
+
* drag start/end.
|
|
2025
|
+
*/
|
|
2026
|
+
draggable?: boolean;
|
|
2027
|
+
/** Fired on drag start (draggable cards only). */
|
|
2028
|
+
onDragStart?: (card: KanbanCard$1) => void;
|
|
2029
|
+
/** Fired on drag end (draggable cards only). */
|
|
2030
|
+
onDragEnd?: () => void;
|
|
1928
2031
|
/** Additional CSS class. */
|
|
1929
2032
|
className?: string;
|
|
1930
2033
|
}
|
|
1931
2034
|
/**
|
|
1932
2035
|
* Render a single kanban card tile.
|
|
1933
2036
|
*/
|
|
1934
|
-
declare function KanbanCard({ card, onClick, selected, dueState, className, }: KanbanCardProps): react_jsx_runtime.JSX.Element;
|
|
2037
|
+
declare function KanbanCard({ card, onClick, selected, dueState, draggable, onDragStart, onDragEnd, className, }: KanbanCardProps): react_jsx_runtime.JSX.Element;
|
|
1935
2038
|
|
|
1936
2039
|
interface CardDrawerProps {
|
|
1937
2040
|
/** The card to display, or null when the drawer is closed. */
|
|
@@ -2118,6 +2221,8 @@ interface UseKanbanBoardResult {
|
|
|
2118
2221
|
}) => Promise<KanbanCard$1 | null>;
|
|
2119
2222
|
/** Manually transition a card; refetches the board afterwards. */
|
|
2120
2223
|
transitionCard: (input: TransitionCardInput) => Promise<KanbanCard$1 | null>;
|
|
2224
|
+
/** Delete a card permanently (optimistic + rollback). Returns success. */
|
|
2225
|
+
deleteCard: (cardId: string) => Promise<boolean>;
|
|
2121
2226
|
/**
|
|
2122
2227
|
* Called by the drawer when the open card's run reaches a terminal state.
|
|
2123
2228
|
* Refetches the board (Spec-1 propagation contract).
|
|
@@ -4762,4 +4867,4 @@ interface KanbanStorageAdapter {
|
|
|
4762
4867
|
getStageRun(idemKey: string): Promise<StageRun | null>;
|
|
4763
4868
|
}
|
|
4764
4869
|
|
|
4765
|
-
export { type Actor, type AdapterCapabilities, AgentBoard, type AgentBoardCardSource, type AgentBoardProps, type ApplyTransitionInput, type BadgeVariant, BoardConfigClient, type BoardConfigClientOptions, type BoardConfigHttp, CadraLifecycleSource, CapMeter, type CapMeterProps, CardDrawer, type CardDrawerProps, type CardList, type CreateCardInput, type CreateCardServerInput, type DefaultKanbanAdapterConfig, type DueRule, type DueState, type KanbanActorType, type KanbanAdapter, KanbanBoard, type KanbanBoard$1 as KanbanBoardData, type KanbanBoardProps, type KanbanCard$1 as KanbanCard, type KanbanCardProps, KanbanCard as KanbanCardTile, KanbanColumn, type KanbanColumnProps, type KanbanHandlerType, type KanbanLane, type KanbanLaneDispatch, type KanbanLaneHandler, type KanbanLaneTrigger, type KanbanRunStatus, type KanbanRunSummary, type KanbanStorageAdapter, type KanbanTransition, type KanbanWebhookBinding, type LaneAgentKind, type LaneAgentOption, LaneAgentPicker, type LaneAgentPickerProps, type LifecycleRef, type LifecycleSource, type LifecycleSourceKind, type ListCardsInput, type ResolveLifecycleRef, type ResolvedBoardConfig, type ResolvedLifecycle, ScheduleStatus, type ScheduleStatusProps, type Stage, type StageRun, type StageRunStatus, type Transition, type TransitionCardInput, type TransitionLogEntry, type UseCardRunOptions, type UseCardRunResult, type UseKanbanBoardOptions, type UseKanbanBoardResult, badgeVariantClass, cn, createDefaultKanbanAdapter, mapDefinitionToBoard, runStatusTone, toResolvedLifecycle, useCardRun, useKanbanBoard };
|
|
4870
|
+
export { type Actor, type AdapterCapabilities, AgentBoard, type AgentBoardCardSource, type AgentBoardProps, type ApplyTransitionInput, type BadgeVariant, BoardConfigClient, type BoardConfigClientOptions, type BoardConfigHttp, CadraLifecycleSource, CapMeter, type CapMeterProps, CardDrawer, type CardDrawerProps, type CardDrawerRenderContext, type CardList, type CreateCardInput, type CreateCardServerInput, type DefaultKanbanAdapterConfig, type DueRule, type DueState, type KanbanActorType, type KanbanAdapter, KanbanBoard, type KanbanBoard$1 as KanbanBoardData, type KanbanBoardProps, type KanbanCard$1 as KanbanCard, type KanbanCardProps, KanbanCard as KanbanCardTile, KanbanColumn, type KanbanColumnProps, type KanbanHandlerType, type KanbanLane, type KanbanLaneDispatch, type KanbanLaneHandler, type KanbanLaneTrigger, type KanbanRunStatus, type KanbanRunSummary, type KanbanStorageAdapter, type KanbanTransition, type KanbanWebhookBinding, type LaneAgentKind, type LaneAgentOption, LaneAgentPicker, type LaneAgentPickerProps, type LifecycleRef, type LifecycleSource, type LifecycleSourceKind, type ListCardsInput, type ResolveLifecycleRef, type ResolvedBoardConfig, type ResolvedLifecycle, ScheduleStatus, type ScheduleStatusProps, type Stage, type StageRun, type StageRunStatus, type Transition, type TransitionCardInput, type TransitionLogEntry, type UseCardRunOptions, type UseCardRunResult, type UseKanbanBoardOptions, type UseKanbanBoardResult, badgeVariantClass, cn, createDefaultKanbanAdapter, mapDefinitionToBoard, runStatusTone, toResolvedLifecycle, useCardRun, useKanbanBoard };
|
package/dist/kanban/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
2
3
|
|
|
3
4
|
/**
|
|
4
5
|
* Shared kanban types for the @cadraos/sdk/kanban module.
|
|
@@ -1639,6 +1640,11 @@ interface KanbanAdapter {
|
|
|
1639
1640
|
* @returns The updated card.
|
|
1640
1641
|
*/
|
|
1641
1642
|
transitionCard(input: TransitionCardInput): Promise<KanbanCard$1>;
|
|
1643
|
+
/**
|
|
1644
|
+
* Delete a card permanently. OPTIONAL — when absent, the board offers no
|
|
1645
|
+
* delete affordance (back-compat). Server-authorized + org-scoped.
|
|
1646
|
+
*/
|
|
1647
|
+
deleteCard?(cardId: string): Promise<void>;
|
|
1642
1648
|
/**
|
|
1643
1649
|
* Create an `ExecutionStreamController` for a card's run, keyed on the
|
|
1644
1650
|
* card's `executionId`.
|
|
@@ -1711,6 +1717,14 @@ interface LaneAgentPickerProps {
|
|
|
1711
1717
|
* "Only Ava (owner) can change agents". Rendered as text, never a tooltip.
|
|
1712
1718
|
*/
|
|
1713
1719
|
lockedReason?: string;
|
|
1720
|
+
/**
|
|
1721
|
+
* MV3 (optional, additive). When provided AND an agent is `selected`, the
|
|
1722
|
+
* open menu shows an "Edit this agent" footer action; clicking it calls
|
|
1723
|
+
* `onEditAgent(selected.id)` and closes the menu. The HOST owns the edit
|
|
1724
|
+
* surface (e.g. an in-shell sheet) — the picker only fires the intent.
|
|
1725
|
+
* Omit → today's render, unchanged.
|
|
1726
|
+
*/
|
|
1727
|
+
onEditAgent?: (agentId: string) => void;
|
|
1714
1728
|
/** Additional CSS class. */
|
|
1715
1729
|
className?: string;
|
|
1716
1730
|
}
|
|
@@ -1718,7 +1732,7 @@ interface LaneAgentPickerProps {
|
|
|
1718
1732
|
* Render the lane agent picker — interactive for owners, locked-with-reason for
|
|
1719
1733
|
* members.
|
|
1720
1734
|
*/
|
|
1721
|
-
declare function LaneAgentPicker({ selected, options, onSelect, canEdit, lockedReason, className, }: LaneAgentPickerProps): react_jsx_runtime.JSX.Element;
|
|
1735
|
+
declare function LaneAgentPicker({ selected, options, onSelect, canEdit, lockedReason, onEditAgent, className, }: LaneAgentPickerProps): react_jsx_runtime.JSX.Element;
|
|
1722
1736
|
|
|
1723
1737
|
interface KanbanBoardProps {
|
|
1724
1738
|
/** The adapter driving the board (default HTTP or a custom direct adapter). */
|
|
@@ -1793,13 +1807,75 @@ interface KanbanBoardProps {
|
|
|
1793
1807
|
* change it) to re-open after the user closes the drawer.
|
|
1794
1808
|
*/
|
|
1795
1809
|
focusCardId?: string;
|
|
1810
|
+
/**
|
|
1811
|
+
* Replace the built-in `CardDrawer` with a HOST-owned drawer (work-shell v2,
|
|
1812
|
+
* Screen C). When provided, the board renders `renderCardDrawer(ctx)` instead
|
|
1813
|
+
* of its internal drawer whenever a card is selected — the host owns the
|
|
1814
|
+
* tabbed Run/Context/Activity/Steer presentation while the board still owns
|
|
1815
|
+
* selection state (`focusCardId`, click-to-open, close). Absent → today's
|
|
1816
|
+
* internal drawer (M10 back-compat; yobo + the test harness are unchanged).
|
|
1817
|
+
*
|
|
1818
|
+
* The context carries everything the internal drawer receives, so the host
|
|
1819
|
+
* drawer can advance/transition/retry/edit the card and react to run-terminal
|
|
1820
|
+
* exactly as the built-in one does.
|
|
1821
|
+
*/
|
|
1822
|
+
renderCardDrawer?: (ctx: CardDrawerRenderContext) => ReactNode;
|
|
1823
|
+
/**
|
|
1824
|
+
* Enable HTML5 drag-to-move cards between lanes (work-shell v2 / MV4). A card
|
|
1825
|
+
* can only be dropped on a lane reachable by a `manualAllowed` transition from
|
|
1826
|
+
* its current lane — allowed lanes highlight, others refuse the drop. The move
|
|
1827
|
+
* commits through the same `transitionCard` path as the drawer (server
|
|
1828
|
+
* re-validates). OPTIONAL — absent → no drag (today's render, M10). Requires
|
|
1829
|
+
* `enableAdvance` (the transitions that gate drops come from the same source).
|
|
1830
|
+
*/
|
|
1831
|
+
enableDrag?: boolean;
|
|
1796
1832
|
/** Additional CSS class for the board container. */
|
|
1797
1833
|
className?: string;
|
|
1798
1834
|
}
|
|
1835
|
+
/**
|
|
1836
|
+
* Everything a HOST-owned card drawer needs — mirrors the props the built-in
|
|
1837
|
+
* `CardDrawer` receives (work-shell v2 Screen C seam). The board owns selection;
|
|
1838
|
+
* the host owns rendering.
|
|
1839
|
+
*/
|
|
1840
|
+
interface CardDrawerRenderContext {
|
|
1841
|
+
/** The currently open card. */
|
|
1842
|
+
card: KanbanCard$1;
|
|
1843
|
+
/** The adapter (provides `getCard`, the run-stream factory, etc.). */
|
|
1844
|
+
adapter: KanbanAdapter;
|
|
1845
|
+
/** All lanes (for resolving transition target labels + human-gate detection). */
|
|
1846
|
+
lanes: KanbanLane[];
|
|
1847
|
+
/**
|
|
1848
|
+
* The lifecycle's declared edges — filter to `fromLane === card.lane &&
|
|
1849
|
+
* manualAllowed` for the "Move to a step" targets. Undefined when advance is
|
|
1850
|
+
* disabled.
|
|
1851
|
+
*/
|
|
1852
|
+
transitions?: KanbanTransition[];
|
|
1853
|
+
/** Whether the card can be advanced (false in a terminal lane). */
|
|
1854
|
+
canAdvance: boolean;
|
|
1855
|
+
/** Close the drawer (clears the board's selection). */
|
|
1856
|
+
onClose: () => void;
|
|
1857
|
+
/** Re-dispatch a failed card. Absent when the host supplied no `onRetryCard`. */
|
|
1858
|
+
onRetry?: (card: KanbanCard$1) => void;
|
|
1859
|
+
/** Persist an inline title/description edit. Absent when `enableEdit` is false. */
|
|
1860
|
+
onUpdate?: (cardId: string, patch: {
|
|
1861
|
+
title?: string;
|
|
1862
|
+
description?: string;
|
|
1863
|
+
}) => void | Promise<void | unknown>;
|
|
1864
|
+
/** Auto-advance a single-edge lane. Absent when `enableAdvance` is false. */
|
|
1865
|
+
onAdvance?: (cardId: string) => void | Promise<void | unknown>;
|
|
1866
|
+
/** Take a specific manual transition. Absent when `enableAdvance` is false. */
|
|
1867
|
+
onTransition?: (cardId: string, toLane: string) => void | Promise<void | unknown>;
|
|
1868
|
+
/** Delete this card permanently. Absent when the adapter has no `deleteCard`. */
|
|
1869
|
+
onDelete?: (cardId: string) => Promise<boolean>;
|
|
1870
|
+
/** Fired when the card's run reaches a terminal state (host should refetch). */
|
|
1871
|
+
onRunTerminal?: (status: "completed" | "failed") => void;
|
|
1872
|
+
/** Fired on a non-throwing run/board error. */
|
|
1873
|
+
onError?: (message: string) => void;
|
|
1874
|
+
}
|
|
1799
1875
|
/**
|
|
1800
1876
|
* Drop-in agent-first kanban board.
|
|
1801
1877
|
*/
|
|
1802
|
-
declare function KanbanBoard({ adapter, onCreateCard, onRetryCard, onError, onCardCreated, enableCreate, enableEdit, enableAdvance, pollIntervalMs, laneCounts, canEditHandlers, laneAgentPicker, scheduleStatus, focusCardId, className, }: KanbanBoardProps): react_jsx_runtime.JSX.Element;
|
|
1878
|
+
declare function KanbanBoard({ adapter, onCreateCard, onRetryCard, onError, onCardCreated, enableCreate, enableEdit, enableAdvance, pollIntervalMs, laneCounts, canEditHandlers, laneAgentPicker, scheduleStatus, focusCardId, renderCardDrawer, enableDrag, className, }: KanbanBoardProps): react_jsx_runtime.JSX.Element;
|
|
1803
1879
|
|
|
1804
1880
|
/**
|
|
1805
1881
|
* The host's BROWSER-SIDE card source. The host implements these against its
|
|
@@ -1821,6 +1897,8 @@ interface AgentBoardCardSource {
|
|
|
1821
1897
|
}): Promise<KanbanCard$1>;
|
|
1822
1898
|
/** Request a manual transition → host engine validates + advances. */
|
|
1823
1899
|
transitionCard(input: TransitionCardInput): Promise<KanbanCard$1>;
|
|
1900
|
+
/** Delete a card permanently. OPTIONAL — absent → no delete affordance. */
|
|
1901
|
+
deleteCard?(cardId: string): Promise<void>;
|
|
1824
1902
|
/**
|
|
1825
1903
|
* Create an `ExecutionStreamController` for a card's run (the SAME controller
|
|
1826
1904
|
* the chat module uses). Optional — when absent, the drawer falls back to the
|
|
@@ -1895,13 +1973,27 @@ interface KanbanColumnProps {
|
|
|
1895
1973
|
* `canEdit` for `agentPicker` when the slot doesn't set its own.
|
|
1896
1974
|
*/
|
|
1897
1975
|
canEditHandlers?: boolean;
|
|
1976
|
+
/** Make this column's cards draggable sources. */
|
|
1977
|
+
draggableCards?: boolean;
|
|
1978
|
+
/** A drag is in progress somewhere on the board (drives the dimming of
|
|
1979
|
+
* non-target lanes). */
|
|
1980
|
+
dragActive?: boolean;
|
|
1981
|
+
/** This lane is a VALID drop target for the card currently being dragged
|
|
1982
|
+
* (`manualAllowed` from its lane) — highlight + accept the drop. */
|
|
1983
|
+
dropAllowed?: boolean;
|
|
1984
|
+
/** Fired when a card in this column starts being dragged. */
|
|
1985
|
+
onCardDragStart?: (card: KanbanCard$1) => void;
|
|
1986
|
+
/** Fired when a drag ends (drop or cancel). */
|
|
1987
|
+
onCardDragEnd?: () => void;
|
|
1988
|
+
/** Fired when a card is dropped onto this lane (only when `dropAllowed`). */
|
|
1989
|
+
onLaneDrop?: (lane: KanbanLane) => void;
|
|
1898
1990
|
/** Additional CSS class. */
|
|
1899
1991
|
className?: string;
|
|
1900
1992
|
}
|
|
1901
1993
|
/**
|
|
1902
1994
|
* Render a single lane column with its cards.
|
|
1903
1995
|
*/
|
|
1904
|
-
declare function KanbanColumn({ lane, cards, onCardClick, selectedCardId, onCreateCard, showCreate, count, agentPicker, canEditHandlers, className, }: KanbanColumnProps): react_jsx_runtime.JSX.Element;
|
|
1996
|
+
declare function KanbanColumn({ lane, cards, onCardClick, selectedCardId, onCreateCard, showCreate, count, agentPicker, canEditHandlers, draggableCards, dragActive, dropAllowed, onCardDragStart, onCardDragEnd, onLaneDrop, className, }: KanbanColumnProps): react_jsx_runtime.JSX.Element;
|
|
1905
1997
|
|
|
1906
1998
|
/**
|
|
1907
1999
|
* A card's lane-relative schedule state (spec §3a), computed by the column from
|
|
@@ -1925,13 +2017,24 @@ interface KanbanCardProps {
|
|
|
1925
2017
|
* (today's render).
|
|
1926
2018
|
*/
|
|
1927
2019
|
dueState?: DueState;
|
|
2020
|
+
/**
|
|
2021
|
+
* Make this card an HTML5 drag SOURCE (work-shell v2 / MV4). OPTIONAL —
|
|
2022
|
+
* absent → not draggable (today's render, M10). The board decides where a
|
|
2023
|
+
* drop is allowed (only `manualAllowed` targets); the card just reports the
|
|
2024
|
+
* drag start/end.
|
|
2025
|
+
*/
|
|
2026
|
+
draggable?: boolean;
|
|
2027
|
+
/** Fired on drag start (draggable cards only). */
|
|
2028
|
+
onDragStart?: (card: KanbanCard$1) => void;
|
|
2029
|
+
/** Fired on drag end (draggable cards only). */
|
|
2030
|
+
onDragEnd?: () => void;
|
|
1928
2031
|
/** Additional CSS class. */
|
|
1929
2032
|
className?: string;
|
|
1930
2033
|
}
|
|
1931
2034
|
/**
|
|
1932
2035
|
* Render a single kanban card tile.
|
|
1933
2036
|
*/
|
|
1934
|
-
declare function KanbanCard({ card, onClick, selected, dueState, className, }: KanbanCardProps): react_jsx_runtime.JSX.Element;
|
|
2037
|
+
declare function KanbanCard({ card, onClick, selected, dueState, draggable, onDragStart, onDragEnd, className, }: KanbanCardProps): react_jsx_runtime.JSX.Element;
|
|
1935
2038
|
|
|
1936
2039
|
interface CardDrawerProps {
|
|
1937
2040
|
/** The card to display, or null when the drawer is closed. */
|
|
@@ -2118,6 +2221,8 @@ interface UseKanbanBoardResult {
|
|
|
2118
2221
|
}) => Promise<KanbanCard$1 | null>;
|
|
2119
2222
|
/** Manually transition a card; refetches the board afterwards. */
|
|
2120
2223
|
transitionCard: (input: TransitionCardInput) => Promise<KanbanCard$1 | null>;
|
|
2224
|
+
/** Delete a card permanently (optimistic + rollback). Returns success. */
|
|
2225
|
+
deleteCard: (cardId: string) => Promise<boolean>;
|
|
2121
2226
|
/**
|
|
2122
2227
|
* Called by the drawer when the open card's run reaches a terminal state.
|
|
2123
2228
|
* Refetches the board (Spec-1 propagation contract).
|
|
@@ -4762,4 +4867,4 @@ interface KanbanStorageAdapter {
|
|
|
4762
4867
|
getStageRun(idemKey: string): Promise<StageRun | null>;
|
|
4763
4868
|
}
|
|
4764
4869
|
|
|
4765
|
-
export { type Actor, type AdapterCapabilities, AgentBoard, type AgentBoardCardSource, type AgentBoardProps, type ApplyTransitionInput, type BadgeVariant, BoardConfigClient, type BoardConfigClientOptions, type BoardConfigHttp, CadraLifecycleSource, CapMeter, type CapMeterProps, CardDrawer, type CardDrawerProps, type CardList, type CreateCardInput, type CreateCardServerInput, type DefaultKanbanAdapterConfig, type DueRule, type DueState, type KanbanActorType, type KanbanAdapter, KanbanBoard, type KanbanBoard$1 as KanbanBoardData, type KanbanBoardProps, type KanbanCard$1 as KanbanCard, type KanbanCardProps, KanbanCard as KanbanCardTile, KanbanColumn, type KanbanColumnProps, type KanbanHandlerType, type KanbanLane, type KanbanLaneDispatch, type KanbanLaneHandler, type KanbanLaneTrigger, type KanbanRunStatus, type KanbanRunSummary, type KanbanStorageAdapter, type KanbanTransition, type KanbanWebhookBinding, type LaneAgentKind, type LaneAgentOption, LaneAgentPicker, type LaneAgentPickerProps, type LifecycleRef, type LifecycleSource, type LifecycleSourceKind, type ListCardsInput, type ResolveLifecycleRef, type ResolvedBoardConfig, type ResolvedLifecycle, ScheduleStatus, type ScheduleStatusProps, type Stage, type StageRun, type StageRunStatus, type Transition, type TransitionCardInput, type TransitionLogEntry, type UseCardRunOptions, type UseCardRunResult, type UseKanbanBoardOptions, type UseKanbanBoardResult, badgeVariantClass, cn, createDefaultKanbanAdapter, mapDefinitionToBoard, runStatusTone, toResolvedLifecycle, useCardRun, useKanbanBoard };
|
|
4870
|
+
export { type Actor, type AdapterCapabilities, AgentBoard, type AgentBoardCardSource, type AgentBoardProps, type ApplyTransitionInput, type BadgeVariant, BoardConfigClient, type BoardConfigClientOptions, type BoardConfigHttp, CadraLifecycleSource, CapMeter, type CapMeterProps, CardDrawer, type CardDrawerProps, type CardDrawerRenderContext, type CardList, type CreateCardInput, type CreateCardServerInput, type DefaultKanbanAdapterConfig, type DueRule, type DueState, type KanbanActorType, type KanbanAdapter, KanbanBoard, type KanbanBoard$1 as KanbanBoardData, type KanbanBoardProps, type KanbanCard$1 as KanbanCard, type KanbanCardProps, KanbanCard as KanbanCardTile, KanbanColumn, type KanbanColumnProps, type KanbanHandlerType, type KanbanLane, type KanbanLaneDispatch, type KanbanLaneHandler, type KanbanLaneTrigger, type KanbanRunStatus, type KanbanRunSummary, type KanbanStorageAdapter, type KanbanTransition, type KanbanWebhookBinding, type LaneAgentKind, type LaneAgentOption, LaneAgentPicker, type LaneAgentPickerProps, type LifecycleRef, type LifecycleSource, type LifecycleSourceKind, type ListCardsInput, type ResolveLifecycleRef, type ResolvedBoardConfig, type ResolvedLifecycle, ScheduleStatus, type ScheduleStatusProps, type Stage, type StageRun, type StageRunStatus, type Transition, type TransitionCardInput, type TransitionLogEntry, type UseCardRunOptions, type UseCardRunResult, type UseKanbanBoardOptions, type UseKanbanBoardResult, badgeVariantClass, cn, createDefaultKanbanAdapter, mapDefinitionToBoard, runStatusTone, toResolvedLifecycle, useCardRun, useKanbanBoard };
|