@makinbakin/sdk 0.0.1-rc.4 → 0.0.1-rc.40
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 +248 -3
- package/_internal/app/components/agent-avatar.d.ts +2 -1
- package/_internal/app/components/conversation/attention.d.ts +56 -0
- package/_internal/app/components/conversation/fold.d.ts +3 -0
- package/_internal/app/components/conversation/notification-sound.d.ts +8 -0
- package/_internal/app/components/conversation/reply-toast.d.ts +15 -0
- package/_internal/app/components/conversation/thread-id.d.ts +8 -0
- package/_internal/app/components/conversation/turn-recorder.d.ts +37 -0
- package/_internal/app/components/conversation/use-conversation-attention.d.ts +61 -0
- package/_internal/app/components/drawer.d.ts +27 -0
- package/_internal/app/components/ui/button.d.ts +2 -8
- package/_internal/app/components/ui/dialog.d.ts +2 -17
- package/_internal/app/components/ui/sheet.d.ts +2 -14
- package/_internal/app/core/conversation-turns.d.ts +229 -0
- package/_internal/app/core/logger.d.ts +1 -0
- package/_internal/app/core/tool-access.d.ts +42 -0
- package/_internal/app/hooks/use-available-models.d.ts +25 -0
- package/_internal/app/hooks/use-content-store.d.ts +0 -9
- package/_internal/app/hooks/use-history-back.d.ts +5 -0
- package/_internal/app/hooks/use-horizontal-resize.d.ts +21 -0
- package/_internal/app/hooks/use-json-fetch.d.ts +36 -0
- package/_internal/app/hooks/use-nav-badge.d.ts +13 -0
- package/_internal/app/hooks/use-plugin-event.d.ts +19 -0
- package/_internal/app/hooks/use-query-state.d.ts +3 -12
- package/_internal/app/hooks/use-resizable-pane.d.ts +35 -0
- package/_internal/app/hooks/use-runtime-status.d.ts +22 -6
- package/_internal/app/hooks/use-schedule.d.ts +47 -1
- package/_internal/app/hooks/use-search.d.ts +27 -8
- package/_internal/app/hooks/use-task-run-history.d.ts +26 -0
- package/_internal/app/hooks/use-toast.d.ts +13 -3
- package/_internal/app/lib/browser-notify.d.ts +12 -1
- package/_internal/app/types/index.d.ts +1 -105
- package/_internal/core/adapters/runtime/channels.d.ts +231 -0
- package/_internal/core/adapters/runtime/concepts.d.ts +794 -235
- package/_internal/core/adapters/runtime/errors.d.ts +105 -0
- package/_internal/core/adapters/runtime/helpers.d.ts +19 -0
- package/_internal/core/adapters/runtime/index.d.ts +8 -2
- package/_internal/core/adapters/runtime/skill-files.d.ts +12 -0
- package/_internal/core/adapters/runtime/testing.d.ts +99 -0
- package/_internal/core/adapters/runtime/turn-activity.d.ts +23 -0
- package/_internal/core/adapters/shared.d.ts +133 -12
- package/_internal/core/content-dir.d.ts +11 -0
- package/_internal/core/delivery/bridge.d.ts +36 -0
- package/_internal/core/docs/route.d.ts +1 -1
- package/_internal/core/format/structured.d.ts +44 -0
- package/_internal/core/format.d.ts +25 -1
- package/_internal/core/health/observation-builders.d.ts +42 -0
- package/_internal/core/media/downscale.d.ts +18 -0
- package/_internal/core/media/pin-data.d.ts +36 -0
- package/_internal/core/media/pin.d.ts +22 -0
- package/_internal/core/media/sharp-import.d.ts +10 -0
- package/_internal/core/media/sharp-loader.d.ts +41 -0
- package/_internal/core/media/store.d.ts +21 -0
- package/_internal/core/plugin-types.d.ts +248 -500
- package/_internal/core/routing/define.d.ts +33 -3
- package/_internal/core/routing/dispatcher.d.ts +15 -6
- package/_internal/core/routing/index.d.ts +1 -1
- package/_internal/core/routing/types.d.ts +13 -70
- package/_internal/core/storage/atomic-write.d.ts +11 -0
- package/_internal/core/tasks/store.d.ts +129 -0
- package/_internal/core/tasks/testing.d.ts +2 -0
- package/_internal/{plugins/workflows/lib → core/workflows}/notification-channel-registry.d.ts +1 -1
- package/_internal/host/ui/action-status.d.ts +13 -0
- package/_internal/host/ui/modals.d.ts +5 -0
- package/_internal/host/ui/resize.d.ts +2 -0
- package/_internal/plugins/team/types.d.ts +61 -4
- package/_internal/plugins/workflows/hooks/use-notification-channels.d.ts +1 -1
- package/_internal/ui/behaviors/clipboard.d.ts +10 -0
- package/_internal/ui/behaviors/resize-handle.d.ts +15 -0
- package/_internal/ui/behaviors/selection-navigation.d.ts +5 -0
- package/_internal/ui/behaviors/use-persisted-leading-edge-resize.d.ts +31 -0
- package/_internal/ui/charts/area-chart.d.ts +27 -0
- package/_internal/ui/charts/axis.d.ts +13 -0
- package/_internal/ui/charts/bar-chart.d.ts +21 -0
- package/_internal/ui/charts/chart-data-table.d.ts +61 -0
- package/_internal/ui/charts/chart-explainer.d.ts +4 -0
- package/_internal/ui/charts/chart-tooltip.d.ts +8 -0
- package/_internal/ui/charts/composition-bar.d.ts +46 -0
- package/_internal/ui/charts/index.d.ts +24 -0
- package/_internal/ui/charts/line-chart.d.ts +26 -0
- package/_internal/ui/charts/monotone-curve.d.ts +23 -0
- package/_internal/ui/charts/palette.d.ts +32 -0
- package/_internal/ui/charts/pie-chart.d.ts +80 -0
- package/_internal/ui/charts/ranked-bar-chart.d.ts +41 -0
- package/_internal/ui/charts/sparkline.d.ts +16 -0
- package/_internal/ui/charts/stacked-column-chart.d.ts +33 -0
- package/_internal/ui/content/code-block.d.ts +43 -0
- package/_internal/ui/content/index.d.ts +2 -0
- package/_internal/ui/conversation/activity-group.d.ts +27 -0
- package/_internal/ui/conversation/agent-turn.d.ts +47 -0
- package/_internal/ui/conversation/composer.d.ts +62 -0
- package/_internal/ui/conversation/context-meter.d.ts +37 -0
- package/_internal/ui/conversation/conversation-empty-state.d.ts +13 -0
- package/_internal/ui/conversation/conversation-header.d.ts +26 -0
- package/_internal/ui/conversation/conversation-panel.d.ts +61 -0
- package/_internal/ui/conversation/conversation.d.ts +37 -0
- package/_internal/ui/conversation/fold.d.ts +150 -0
- package/_internal/ui/conversation/glyphs.d.ts +30 -0
- package/_internal/ui/conversation/index.d.ts +31 -0
- package/_internal/ui/conversation/queued-message-list.d.ts +22 -0
- package/_internal/ui/conversation/relative-time.d.ts +8 -0
- package/_internal/ui/conversation/tool-call-drawer.d.ts +14 -0
- package/_internal/ui/conversation/turn-controls.d.ts +9 -0
- package/_internal/ui/conversation/turn-output.d.ts +42 -0
- package/_internal/ui/conversation/turn-usage.d.ts +16 -0
- package/_internal/ui/conversation/user-message.d.ts +13 -0
- package/_internal/ui/forms/field.d.ts +30 -0
- package/_internal/ui/forms/fieldset.d.ts +10 -0
- package/_internal/ui/forms/form.d.ts +19 -0
- package/_internal/ui/forms/index.d.ts +6 -0
- package/_internal/ui/index.d.ts +89 -0
- package/_internal/ui/layout/bounded-overflow.d.ts +42 -0
- package/_internal/ui/layout/disclosure-panel.d.ts +24 -0
- package/_internal/ui/layout/flow.d.ts +27 -0
- package/_internal/ui/layout/grid.d.ts +16 -0
- package/_internal/ui/layout/index.d.ts +14 -0
- package/_internal/ui/layout/page-shell.d.ts +11 -0
- package/_internal/ui/layout/panel.d.ts +28 -0
- package/_internal/ui/layout/section.d.ts +15 -0
- package/_internal/ui/layout/sticky-overflow-scrollbar.d.ts +11 -0
- package/_internal/ui/layout/utils.d.ts +1 -0
- package/_internal/ui/patterns/agent-filter.d.ts +21 -0
- package/_internal/ui/patterns/calendar-grid.d.ts +80 -0
- package/_internal/ui/patterns/calendar-item.d.ts +42 -0
- package/_internal/ui/patterns/calendar-nav.d.ts +21 -0
- package/_internal/ui/patterns/confirm-dialog.d.ts +29 -0
- package/_internal/ui/patterns/copy-button.d.ts +15 -0
- package/_internal/ui/patterns/danger-zone.d.ts +17 -0
- package/_internal/ui/patterns/data-table.d.ts +157 -0
- package/_internal/ui/patterns/drawer-section.d.ts +11 -0
- package/_internal/ui/patterns/facet-filter.d.ts +22 -0
- package/_internal/ui/patterns/filter-indicator.d.ts +3 -0
- package/_internal/ui/patterns/guide-card.d.ts +33 -0
- package/_internal/ui/patterns/index.d.ts +75 -0
- package/_internal/ui/patterns/inspector-panel.d.ts +39 -0
- package/_internal/ui/patterns/kanban.d.ts +70 -0
- package/_internal/ui/patterns/key-value.d.ts +35 -0
- package/_internal/ui/patterns/list-rows.d.ts +111 -0
- package/_internal/ui/patterns/nav-list.d.ts +41 -0
- package/_internal/ui/patterns/node-card.d.ts +37 -0
- package/_internal/ui/patterns/page-aside.d.ts +49 -0
- package/_internal/ui/patterns/page-body.d.ts +49 -0
- package/_internal/ui/patterns/page-canvas.d.ts +12 -0
- package/_internal/ui/patterns/page-composer.d.ts +8 -0
- package/_internal/ui/patterns/page-controls.d.ts +33 -0
- package/_internal/ui/patterns/page-header.d.ts +40 -0
- package/_internal/ui/patterns/page-timeline.d.ts +18 -0
- package/_internal/ui/patterns/page.d.ts +32 -0
- package/_internal/ui/patterns/pagination.d.ts +23 -0
- package/_internal/ui/patterns/save-bar.d.ts +21 -0
- package/_internal/ui/patterns/search-input.d.ts +20 -0
- package/_internal/ui/patterns/segmented-control.d.ts +22 -0
- package/_internal/ui/patterns/sortable-head.d.ts +13 -0
- package/_internal/ui/patterns/stat-group.d.ts +8 -0
- package/_internal/ui/patterns/stat-tile.d.ts +25 -0
- package/_internal/ui/patterns/status-badge.d.ts +15 -0
- package/_internal/ui/patterns/status-marker.d.ts +10 -0
- package/_internal/ui/patterns/timeline.d.ts +59 -0
- package/_internal/ui/patterns/unsaved-changes-dialog.d.ts +22 -0
- package/_internal/ui/patterns/workspace-page.d.ts +76 -0
- package/_internal/ui/primitives/alert.d.ts +17 -0
- package/_internal/ui/primitives/avatar.d.ts +13 -0
- package/_internal/ui/primitives/badge.d.ts +27 -0
- package/_internal/ui/primitives/button.d.ts +32 -0
- package/_internal/ui/primitives/card.d.ts +55 -0
- package/_internal/ui/primitives/checkbox.d.ts +3 -0
- package/_internal/ui/primitives/collapsible.d.ts +7 -0
- package/_internal/ui/primitives/color-input.d.ts +21 -0
- package/_internal/ui/primitives/combobox.d.ts +40 -0
- package/_internal/ui/primitives/command.d.ts +36 -0
- package/_internal/ui/primitives/control-styles.d.ts +10 -0
- package/_internal/ui/primitives/dialog.d.ts +31 -0
- package/_internal/ui/primitives/dropdown-menu.d.ts +54 -0
- package/_internal/ui/primitives/file-input.d.ts +33 -0
- package/_internal/ui/primitives/input-group.d.ts +30 -0
- package/_internal/ui/primitives/input.d.ts +10 -0
- package/_internal/ui/primitives/interactive-surface.d.ts +24 -0
- package/_internal/ui/primitives/label.d.ts +3 -0
- package/_internal/ui/primitives/modal-context.d.ts +9 -0
- package/_internal/ui/primitives/option-list.d.ts +10 -0
- package/_internal/ui/primitives/popover.d.ts +18 -0
- package/_internal/ui/primitives/portal-ownership.d.ts +11 -0
- package/_internal/ui/primitives/progress.d.ts +38 -0
- package/_internal/ui/primitives/radio-group.d.ts +12 -0
- package/_internal/ui/primitives/select.d.ts +35 -0
- package/_internal/ui/primitives/separator.d.ts +7 -0
- package/_internal/ui/primitives/sheet.d.ts +34 -0
- package/_internal/ui/primitives/shimmer-text.d.ts +13 -0
- package/_internal/ui/primitives/skeleton.d.ts +6 -0
- package/_internal/ui/primitives/spinner.d.ts +31 -0
- package/_internal/ui/primitives/switch.d.ts +6 -0
- package/_internal/{app/components/ui → ui/primitives}/tabs.d.ts +1 -1
- package/_internal/ui/primitives/text.d.ts +43 -0
- package/_internal/ui/primitives/textarea.d.ts +19 -0
- package/_internal/ui/primitives/tooltip.d.ts +14 -0
- package/_internal/ui/primitives/use-textarea-autosize.d.ts +3 -0
- package/_internal/ui/private-ui-boundary-probe.d.ts +9 -0
- package/_internal/ui/states/banner.d.ts +15 -0
- package/_internal/ui/states/index.d.ts +6 -0
- package/_internal/ui/states/system-state.d.ts +88 -0
- package/_internal/ui/states/toast.d.ts +26 -0
- package/_internal/ui/utils.d.ts +14 -0
- package/bin/bakin-plugin-test-ui.js +6854 -0
- package/charts/index.d.ts +3 -0
- package/charts/index.js +2 -0
- package/content/index.d.ts +14 -0
- package/content/index.js +38 -0
- package/content/markdown-comparison.d.ts +12 -0
- package/content/markdown-content.d.ts +18 -0
- package/content/markdown-document.d.ts +4 -0
- package/content/markdown-editor.d.ts +35 -0
- package/conversation/index.d.ts +50 -0
- package/conversation/index.js +4 -0
- package/conversation/use-conversation-thread.d.ts +73 -0
- package/hooks/index.d.ts +86 -11
- package/hooks/index.js +1 -1747
- package/hooks/router.d.ts +4 -36
- package/index.d.ts +30 -6
- package/index.js +10 -14210
- package/internal/index.d.ts +74 -0
- package/internal/index.js +2 -0
- package/internal/lazy.d.ts +58 -0
- package/internal/plugin-ownership.d.ts +18 -0
- package/internal/private-ui-boundary-probe.d.ts +2 -0
- package/layout/index.d.ts +9 -0
- package/layout/index.js +2 -0
- package/metadata/index.d.ts +14 -1
- package/metadata/index.js +1 -30
- package/navigation/history-back.d.ts +5 -0
- package/navigation/index.d.ts +23 -0
- package/navigation/index.js +2 -0
- package/navigation/plugin-link.d.ts +11 -0
- package/navigation/query-state.d.ts +7 -0
- package/navigation/router.d.ts +35 -0
- package/navigation/search-params.d.ts +7 -0
- package/navigation/unsaved-changes-guard.d.ts +35 -0
- package/package.json +63 -10
- package/patterns/agent-patterns.d.ts +81 -0
- package/patterns/asset-library-picker.d.ts +38 -0
- package/patterns/channel-patterns.d.ts +32 -0
- package/patterns/index.d.ts +40 -0
- package/patterns/index.js +47 -0
- package/patterns/picker-patterns.d.ts +108 -0
- package/patterns/plugin-settings-renderer.d.ts +41 -0
- package/patterns/presentation-color.d.ts +2 -0
- package/patterns/search-patterns.d.ts +51 -0
- package/register.d.ts +63 -9
- package/routing/index.d.ts +6 -1
- package/routing/index.js +10 -14014
- package/slots/index.d.ts +12 -24
- package/slots/index.js +1 -91
- package/slots/registry.d.ts +45 -0
- package/styles.css +2 -0
- package/testing/index.d.ts +122 -0
- package/testing/index.js +93 -0
- package/testing/ui/conformance/cli.d.ts +2 -0
- package/testing/ui/conformance/contracts.d.ts +73 -0
- package/testing/ui/conformance/index.d.ts +11 -0
- package/testing/ui/conformance/index.js +85 -0
- package/testing/ui/conformance/plugin-css.d.ts +37 -0
- package/testing/ui/conformance/plugin-id.d.ts +6 -0
- package/testing/ui/conformance/runner.d.ts +13 -0
- package/testing/ui/index.d.ts +24 -0
- package/testing/ui/index.js +2 -0
- package/testing/ui/plugin-ui-fixture-host.d.ts +36 -0
- package/testing/ui/runtime.d.ts +70 -0
- package/types/api-route.d.ts +89 -0
- package/types/context.d.ts +166 -0
- package/types/conversation-turns.d.ts +229 -0
- package/types/events.d.ts +10 -0
- package/types/health.d.ts +376 -0
- package/types/index.d.ts +19 -919
- package/types/index.js +1 -0
- package/types/manifest.d.ts +255 -0
- package/types/primitives.d.ts +33 -0
- package/types/registration.d.ts +281 -0
- package/types/runtime.d.ts +292 -0
- package/types/scheduled-events.d.ts +80 -0
- package/types/services.d.ts +599 -0
- package/ui/index.d.ts +73 -31
- package/ui/index.js +38 -28704
- package/utils/asset-id.d.ts +15 -0
- package/utils/index.d.ts +27 -7
- package/utils/index.js +4 -2098
- package/utils/plugin-fetch.d.ts +44 -0
- package/_internal/app/components/agent-filter.d.ts +0 -8
- package/_internal/app/components/agent-select.d.ts +0 -15
- package/_internal/app/components/agent-status.d.ts +0 -8
- package/_internal/app/components/bakin-drawer.d.ts +0 -23
- package/_internal/app/components/color-picker.d.ts +0 -7
- package/_internal/app/components/empty-state.d.ts +0 -10
- package/_internal/app/components/error-banner.d.ts +0 -6
- package/_internal/app/components/error-state.d.ts +0 -8
- package/_internal/app/components/facet-filter.d.ts +0 -17
- package/_internal/app/components/integrated-brainstorm/activity.d.ts +0 -23
- package/_internal/app/components/integrated-brainstorm/collapsed-header.d.ts +0 -14
- package/_internal/app/components/integrated-brainstorm/empty-state.d.ts +0 -5
- package/_internal/app/components/integrated-brainstorm/index.d.ts +0 -8
- package/_internal/app/components/integrated-brainstorm/input-row.d.ts +0 -16
- package/_internal/app/components/integrated-brainstorm/message-list.d.ts +0 -8
- package/_internal/app/components/integrated-brainstorm/session.d.ts +0 -16
- package/_internal/app/components/integrated-brainstorm/sse.d.ts +0 -8
- package/_internal/app/components/integrated-brainstorm/thinking-indicator.d.ts +0 -19
- package/_internal/app/components/integrated-brainstorm/types.d.ts +0 -63
- package/_internal/app/components/integrated-brainstorm/use-auto-grow.d.ts +0 -6
- package/_internal/app/components/integrated-brainstorm/use-brainstorm-state.d.ts +0 -21
- package/_internal/app/components/markdown-content.d.ts +0 -3
- package/_internal/app/components/markdown-editor.d.ts +0 -11
- package/_internal/app/components/model-select.d.ts +0 -9
- package/_internal/app/components/page-layout.d.ts +0 -9
- package/_internal/app/components/plugin-header.d.ts +0 -16
- package/_internal/app/components/plugin-settings-renderer.d.ts +0 -9
- package/_internal/app/components/sortable-head.d.ts +0 -13
- package/_internal/app/components/ui/alert.d.ts +0 -10
- package/_internal/app/components/ui/avatar.d.ts +0 -11
- package/_internal/app/components/ui/badge.d.ts +0 -7
- package/_internal/app/components/ui/card.d.ts +0 -11
- package/_internal/app/components/ui/checkbox.d.ts +0 -3
- package/_internal/app/components/ui/collapsible.d.ts +0 -5
- package/_internal/app/components/ui/command.d.ts +0 -19
- package/_internal/app/components/ui/dropdown-menu.d.ts +0 -29
- package/_internal/app/components/ui/form.d.ts +0 -23
- package/_internal/app/components/ui/input-group.d.ts +0 -18
- package/_internal/app/components/ui/input.d.ts +0 -3
- package/_internal/app/components/ui/label.d.ts +0 -3
- package/_internal/app/components/ui/popover.d.ts +0 -9
- package/_internal/app/components/ui/progress.d.ts +0 -7
- package/_internal/app/components/ui/select.d.ts +0 -15
- package/_internal/app/components/ui/separator.d.ts +0 -3
- package/_internal/app/components/ui/skeleton.d.ts +0 -2
- package/_internal/app/components/ui/switch.d.ts +0 -5
- package/_internal/app/components/ui/textarea.d.ts +0 -3
- package/_internal/app/components/ui/tooltip.d.ts +0 -6
- package/_internal/app/components/underline-tabs.d.ts +0 -15
- package/_internal/app/hooks/use-assets.d.ts +0 -25
- package/_internal/app/hooks/use-form-guard.d.ts +0 -5
- package/_internal/app/hooks/use-vertical-resize.d.ts +0 -22
- package/_internal/app/lib/utils.d.ts +0 -2
- package/_internal/plugins/workflows/hooks/channel-icon.d.ts +0 -6
- package/components/index.d.ts +0 -34
- package/components/index.js +0 -40175
- /package/_internal/{app/components/ui → ui/primitives}/table.d.ts +0 -0
|
@@ -4,7 +4,7 @@ export interface SearchResult {
|
|
|
4
4
|
score: number;
|
|
5
5
|
fields: Record<string, unknown>;
|
|
6
6
|
_table?: string;
|
|
7
|
-
/** Per-
|
|
7
|
+
/** Per-leg score breakdown keyed by neutral leg names (e.g. { full_text: 0.8, assets_visual: -0.2 }) */
|
|
8
8
|
indexScores?: Record<string, number>;
|
|
9
9
|
}
|
|
10
10
|
export interface SearchResponse {
|
|
@@ -17,25 +17,39 @@ export interface SearchResponse {
|
|
|
17
17
|
query: string;
|
|
18
18
|
total: number;
|
|
19
19
|
took_ms: number;
|
|
20
|
-
source: 'search' | '
|
|
20
|
+
source: 'search' | 'unavailable';
|
|
21
|
+
/** True when any source degraded/was omitted under the query budget. */
|
|
22
|
+
partial?: boolean;
|
|
23
|
+
tables?: Array<{
|
|
24
|
+
table: string;
|
|
25
|
+
hits: number;
|
|
26
|
+
took_ms: number;
|
|
27
|
+
budget?: 'degraded' | 'omitted';
|
|
28
|
+
}>;
|
|
21
29
|
};
|
|
22
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* Honest search lifecycle (spec D11). `unavailable` is the explicit
|
|
33
|
+
* engine-down signal (HTTP 503 `search_unavailable`) — render
|
|
34
|
+
* `<SearchUnavailable/>`, never a silent lower-quality substitute.
|
|
35
|
+
*/
|
|
36
|
+
export type SearchStatus = 'idle' | 'loading' | 'ok' | 'unavailable' | 'error';
|
|
23
37
|
export interface UseSearchOptions {
|
|
24
38
|
/**
|
|
25
39
|
* Plugin id to route the query to. When set, the hook fetches
|
|
26
40
|
* `/api/plugins/{plugin}/search?q=...` — the plugin owns its table
|
|
27
41
|
* name and the client never sees the raw `bakin_` prefix. Omit for
|
|
28
|
-
* cross-plugin search
|
|
42
|
+
* cross-plugin search via `/api/search?q=...`.
|
|
29
43
|
*/
|
|
30
44
|
plugin?: string;
|
|
31
45
|
/** Max results */
|
|
32
46
|
limit?: number;
|
|
33
47
|
/** Facet fields to include aggregation counts for */
|
|
34
48
|
facets?: string[];
|
|
49
|
+
/** Restrict cross-plugin search to these content types (tables). */
|
|
50
|
+
types?: string[];
|
|
35
51
|
/** Debounce delay in ms (default: 250) */
|
|
36
52
|
debounce?: number;
|
|
37
|
-
/** Fallback filter function when search returns no results or errors */
|
|
38
|
-
fallback?: (query: string) => SearchResult[];
|
|
39
53
|
}
|
|
40
54
|
export interface UseSearchReturn {
|
|
41
55
|
results: SearchResult[];
|
|
@@ -43,11 +57,15 @@ export interface UseSearchReturn {
|
|
|
43
57
|
value: string;
|
|
44
58
|
count: number;
|
|
45
59
|
}>>;
|
|
60
|
+
status: SearchStatus;
|
|
61
|
+
/** True while a request is in flight or debounce-pending (=== status 'loading'). */
|
|
46
62
|
loading: boolean;
|
|
47
63
|
error: string | null;
|
|
48
64
|
meta: SearchResponse['meta'] | null;
|
|
49
65
|
search: (query: string) => void;
|
|
50
66
|
clear: () => void;
|
|
67
|
+
/** Re-run the last query immediately (Retry in the unavailable state). */
|
|
68
|
+
retry: () => void;
|
|
51
69
|
}
|
|
52
70
|
/**
|
|
53
71
|
* Given a client-side filtered list and search results, reorder the list
|
|
@@ -58,8 +76,9 @@ export declare function reorderBySearchResults<T extends {
|
|
|
58
76
|
id: string;
|
|
59
77
|
}>(items: T[], searchResults: SearchResult[]): T[];
|
|
60
78
|
/**
|
|
61
|
-
* React hook for Bakin search with debouncing
|
|
62
|
-
*
|
|
63
|
-
*
|
|
79
|
+
* React hook for Bakin search with debouncing and AbortController.
|
|
80
|
+
* Scopes to a plugin via `plugin:` or runs cross-plugin when omitted.
|
|
81
|
+
* There is deliberately NO client-side fallback: engine-down is an
|
|
82
|
+
* explicit `unavailable` status the UI must surface (spec D11).
|
|
64
83
|
*/
|
|
65
84
|
export declare function useSearch(options?: UseSearchOptions): UseSearchReturn;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/** Task-level terminal outcome (mirrors plugins/tasks TaskOutcome). */
|
|
2
|
+
export interface TaskOutcome {
|
|
3
|
+
state: 'done' | 'blocked' | 'archived' | 'in_progress';
|
|
4
|
+
/** Set when state === 'done' and a completion row exists. */
|
|
5
|
+
completedAt?: string;
|
|
6
|
+
/** Agent that recorded the completion, when known. */
|
|
7
|
+
agent?: string;
|
|
8
|
+
}
|
|
9
|
+
/** One dispatch attempt for a task (mirrors plugins/tasks TaskRunEntry). */
|
|
10
|
+
export interface TaskRunEntry {
|
|
11
|
+
runId: string;
|
|
12
|
+
taskId: string;
|
|
13
|
+
seq: number;
|
|
14
|
+
agent: string;
|
|
15
|
+
status: 'running' | 'settled' | 'superseded' | 'lost';
|
|
16
|
+
startedAt: string;
|
|
17
|
+
settledAt?: string;
|
|
18
|
+
settleReason?: string;
|
|
19
|
+
durationMs?: number;
|
|
20
|
+
}
|
|
21
|
+
/** Fetch a task's dispatch run history (newest-first) + task outcome from the execution ledger. */
|
|
22
|
+
export declare function useTaskRunHistory(taskId: string | null, limit?: number): {
|
|
23
|
+
runs: TaskRunEntry[];
|
|
24
|
+
outcome: TaskOutcome | undefined;
|
|
25
|
+
loading: boolean;
|
|
26
|
+
};
|
|
@@ -4,13 +4,23 @@ export interface Toast {
|
|
|
4
4
|
message: ReactNode;
|
|
5
5
|
type: 'success' | 'error' | 'info';
|
|
6
6
|
duration?: number;
|
|
7
|
+
/** Optional heading above the message (the kit Toast's title slot). */
|
|
8
|
+
title?: ReactNode;
|
|
9
|
+
/** Optional action row (the kit Toast's action slot). */
|
|
10
|
+
action?: ReactNode;
|
|
11
|
+
/**
|
|
12
|
+
* Stays until dismissed — no timer. For attention the operator must act
|
|
13
|
+
* on (the spend ladder's 90% and cap toasts); a caller that needs to know
|
|
14
|
+
* WHEN it was closed subscribes to the store and watches its id go.
|
|
15
|
+
*/
|
|
16
|
+
persistent?: boolean;
|
|
7
17
|
}
|
|
8
18
|
interface ToastStore {
|
|
9
19
|
toasts: Toast[];
|
|
10
|
-
add: (toast: Omit<Toast, 'id'>) =>
|
|
20
|
+
add: (toast: Omit<Toast, 'id'>) => string;
|
|
11
21
|
dismiss: (id: string) => void;
|
|
12
22
|
}
|
|
13
23
|
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):
|
|
24
|
+
/** Convenience: call from anywhere without hooks. Returns the toast id for programmatic dismiss. */
|
|
25
|
+
export declare function toast(message: ReactNode, type?: Toast['type'], duration?: number): string;
|
|
16
26
|
export {};
|
|
@@ -1,5 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Navigate bridge — the host registers its router here at boot so
|
|
3
|
+
* notification clicks route client-side instead of full-reloading the shell.
|
|
4
|
+
* globalThis-based (like __bakinBroadcast) because every plugin bundle
|
|
5
|
+
* inlines its own copy of this module; a module-level variable would never
|
|
6
|
+
* reach those copies.
|
|
7
|
+
*/
|
|
8
|
+
type NavigateFn = (url: string) => void;
|
|
9
|
+
export declare function setNotificationNavigator(navigate: NavigateFn): void;
|
|
10
|
+
export declare function navigateToUrl(url: string): void;
|
|
1
11
|
export declare function isNotificationsSupported(): boolean;
|
|
2
12
|
export declare function isNotificationsEnabled(): boolean;
|
|
3
13
|
export declare function requestNotificationPermission(): Promise<boolean>;
|
|
4
14
|
export declare function toggleNotifications(enabled: boolean): void;
|
|
5
|
-
export declare function sendBrowserNotification(title: string, body: string): void;
|
|
15
|
+
export declare function sendBrowserNotification(title: string, body: string, url?: string): void;
|
|
16
|
+
export {};
|
|
@@ -1,113 +1,8 @@
|
|
|
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
1
|
export interface Heartbeat {
|
|
49
2
|
status: 'working' | 'idle' | 'down';
|
|
50
3
|
currentTask?: string;
|
|
51
4
|
timestamp: string;
|
|
52
5
|
}
|
|
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
6
|
export interface ActivityEvent {
|
|
112
7
|
id: string;
|
|
113
8
|
ts: string;
|
|
@@ -118,6 +13,7 @@ export interface ActivityEvent {
|
|
|
118
13
|
taskTitle?: string;
|
|
119
14
|
eventName?: string;
|
|
120
15
|
duplicate?: boolean;
|
|
16
|
+
data?: Record<string, unknown>;
|
|
121
17
|
}
|
|
122
18
|
export interface ContentState {
|
|
123
19
|
files: Record<string, string>;
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Channel/delivery contract types — a LEAF module (imports only
|
|
3
|
+
* ./capabilities) so both the runtime contract (concepts.ts) and the
|
|
4
|
+
* delivery-bridge seam (packages/core/src/delivery/bridge.ts, threaded
|
|
5
|
+
* through AdapterInitOpts in ../shared.ts) can share the surface without an
|
|
6
|
+
* import cycle: shared -> bridge -> channels and concepts -> channels.
|
|
7
|
+
*/
|
|
8
|
+
import type { ChannelCapability } from './capabilities';
|
|
9
|
+
export type RuntimeMetadata = Record<string, unknown>;
|
|
10
|
+
export interface ChannelInfo {
|
|
11
|
+
id: string;
|
|
12
|
+
platform: string;
|
|
13
|
+
label: string;
|
|
14
|
+
capabilities: ChannelCapability[];
|
|
15
|
+
metadata?: RuntimeMetadata;
|
|
16
|
+
}
|
|
17
|
+
export interface DeliveryResult {
|
|
18
|
+
deliveries: ApprovalDelivery[];
|
|
19
|
+
}
|
|
20
|
+
export interface NotificationArgs {
|
|
21
|
+
channels: string[];
|
|
22
|
+
notification: {
|
|
23
|
+
severity: 'info' | 'warn' | 'error' | 'success';
|
|
24
|
+
title: string;
|
|
25
|
+
body: string;
|
|
26
|
+
fields?: {
|
|
27
|
+
label: string;
|
|
28
|
+
value: string;
|
|
29
|
+
}[];
|
|
30
|
+
metadata?: RuntimeMetadata;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export interface ChannelMessageArgs {
|
|
34
|
+
channels: string[];
|
|
35
|
+
message: {
|
|
36
|
+
body: string;
|
|
37
|
+
title?: string;
|
|
38
|
+
threadId?: string;
|
|
39
|
+
metadata?: RuntimeMetadata;
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
export interface ContentDeliveryArgs {
|
|
43
|
+
channels: string[];
|
|
44
|
+
content: {
|
|
45
|
+
title: string;
|
|
46
|
+
body?: string;
|
|
47
|
+
url?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Path files are read from disk (trusted plugin/core callers only). For
|
|
50
|
+
* `{ kind: 'asset' }` refs, `filename` is the ASSET ID — providers
|
|
51
|
+
* resolve it through the `assets.resolveServe` hook; an unresolvable id
|
|
52
|
+
* degrades to a visible omission, never a failed delivery.
|
|
53
|
+
*/
|
|
54
|
+
files?: Array<{
|
|
55
|
+
name: string;
|
|
56
|
+
path: string;
|
|
57
|
+
contentType?: string;
|
|
58
|
+
} | {
|
|
59
|
+
kind: 'asset';
|
|
60
|
+
filename: string;
|
|
61
|
+
mimeType?: string;
|
|
62
|
+
}>;
|
|
63
|
+
metadata?: RuntimeMetadata;
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
export interface CreateThreadArgs {
|
|
67
|
+
/** Channel ref the anchor message lives in (provider or provider:target). */
|
|
68
|
+
channel: string;
|
|
69
|
+
/** Delivery ref of the message to anchor the thread to (e.g. "message:<id>"). */
|
|
70
|
+
messageRef?: string;
|
|
71
|
+
name: string;
|
|
72
|
+
}
|
|
73
|
+
export interface CreatedThread {
|
|
74
|
+
threadId: string;
|
|
75
|
+
/**
|
|
76
|
+
* Provider-addressable channel ref for posting INTO the thread (opaque to
|
|
77
|
+
* callers — provider target syntax stays inside the adapter).
|
|
78
|
+
*/
|
|
79
|
+
channelRef: string;
|
|
80
|
+
}
|
|
81
|
+
export interface EditChannelMessageArgs {
|
|
82
|
+
/** Channel ref the message lives in (provider or provider:target). */
|
|
83
|
+
channel: string;
|
|
84
|
+
/** Delivery ref of the message to edit (e.g. "message:<id>"). */
|
|
85
|
+
messageRef: string;
|
|
86
|
+
body: string;
|
|
87
|
+
}
|
|
88
|
+
export interface ApprovalOption {
|
|
89
|
+
id: string;
|
|
90
|
+
label: string;
|
|
91
|
+
variant?: 'primary' | 'destructive' | 'neutral';
|
|
92
|
+
}
|
|
93
|
+
export interface ApprovalDelivery {
|
|
94
|
+
channelId: string;
|
|
95
|
+
ref: string;
|
|
96
|
+
renderedAt: string;
|
|
97
|
+
}
|
|
98
|
+
export interface ApprovalPatch {
|
|
99
|
+
body?: string;
|
|
100
|
+
options?: ApprovalOption[];
|
|
101
|
+
expiresAt?: string;
|
|
102
|
+
context?: RuntimeMetadata;
|
|
103
|
+
}
|
|
104
|
+
export interface ApprovalResponse {
|
|
105
|
+
selectedOption: string;
|
|
106
|
+
respondedAt: string;
|
|
107
|
+
actor: {
|
|
108
|
+
type: 'agent' | 'human';
|
|
109
|
+
id: string;
|
|
110
|
+
displayName?: string;
|
|
111
|
+
};
|
|
112
|
+
comment?: string;
|
|
113
|
+
}
|
|
114
|
+
export interface ApprovalRenderResult {
|
|
115
|
+
deliveries: ApprovalDelivery[];
|
|
116
|
+
}
|
|
117
|
+
export interface ApprovalRenderRef {
|
|
118
|
+
approvalId: string;
|
|
119
|
+
deliveries: ApprovalDelivery[];
|
|
120
|
+
}
|
|
121
|
+
export interface CreateApprovalArgs {
|
|
122
|
+
approvalId: string;
|
|
123
|
+
channels: string[];
|
|
124
|
+
request: {
|
|
125
|
+
title: string;
|
|
126
|
+
body: string;
|
|
127
|
+
options: ApprovalOption[];
|
|
128
|
+
expiresAt?: string;
|
|
129
|
+
context?: RuntimeMetadata;
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
export interface EditApprovalArgs extends ApprovalRenderRef {
|
|
133
|
+
patch: ApprovalPatch;
|
|
134
|
+
}
|
|
135
|
+
export interface CancelApprovalArgs extends ApprovalRenderRef {
|
|
136
|
+
reason?: string;
|
|
137
|
+
}
|
|
138
|
+
export interface ResolveApprovalArgs extends ApprovalRenderRef {
|
|
139
|
+
response: ApprovalResponse;
|
|
140
|
+
}
|
|
141
|
+
export interface ApprovalResolveEvent {
|
|
142
|
+
approvalId: string;
|
|
143
|
+
response: ApprovalResponse;
|
|
144
|
+
channelId: string;
|
|
145
|
+
}
|
|
146
|
+
export interface DurableApprovalRecord {
|
|
147
|
+
approvalId: string;
|
|
148
|
+
owner: {
|
|
149
|
+
workflowId: string;
|
|
150
|
+
runId: string;
|
|
151
|
+
stepId: string;
|
|
152
|
+
taskId?: string;
|
|
153
|
+
};
|
|
154
|
+
status: 'pending' | 'approved' | 'rejected' | 'cancelled' | 'expired';
|
|
155
|
+
request: CreateApprovalArgs['request'];
|
|
156
|
+
deliveries: ApprovalDelivery[];
|
|
157
|
+
response?: ApprovalResponse;
|
|
158
|
+
createdAt: string;
|
|
159
|
+
updatedAt: string;
|
|
160
|
+
resolvedAt?: string;
|
|
161
|
+
}
|
|
162
|
+
/** An inbound attachment already materialized to a LOCAL file by the provider. */
|
|
163
|
+
export interface InboundChannelAttachment {
|
|
164
|
+
name: string;
|
|
165
|
+
path: string;
|
|
166
|
+
contentType?: string;
|
|
167
|
+
size?: number;
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* A human message arriving FROM a channel (#669 Phase B). The provider has
|
|
171
|
+
* already applied its gating (allowlists, mention requirements) — a handler
|
|
172
|
+
* receiving this may treat the sender as authorized. `channelRef` is
|
|
173
|
+
* provider-qualified and directly usable as a send target for the reply.
|
|
174
|
+
*/
|
|
175
|
+
export interface InboundChannelMessage {
|
|
176
|
+
platform: string;
|
|
177
|
+
channelRef: string;
|
|
178
|
+
authorId: string;
|
|
179
|
+
authorName?: string;
|
|
180
|
+
text: string;
|
|
181
|
+
attachments?: InboundChannelAttachment[];
|
|
182
|
+
/** Provider message ref (e.g. "message:<id>"). */
|
|
183
|
+
messageRef: string;
|
|
184
|
+
/**
|
|
185
|
+
* Structured control command (e.g. a slash command) instead of chat text —
|
|
186
|
+
* when present, `text` is empty and consumers act on the verb ("new-chat"
|
|
187
|
+
* unbinds the channel's chat so the next message starts fresh). The
|
|
188
|
+
* provider has already acked the command UI-side.
|
|
189
|
+
*/
|
|
190
|
+
command?: {
|
|
191
|
+
name: string;
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* The full channel surface a delivering runtime exposes (see
|
|
196
|
+
* `AgentRuntimeAdapter.channels` for the capability semantics — the member
|
|
197
|
+
* is OPTIONAL there; this type is the shape when present).
|
|
198
|
+
*/
|
|
199
|
+
export interface RuntimeChannelSurface {
|
|
200
|
+
list(): Promise<ChannelInfo[]>;
|
|
201
|
+
sendNotification(args: NotificationArgs): Promise<DeliveryResult>;
|
|
202
|
+
sendMessage(args: ChannelMessageArgs): Promise<DeliveryResult>;
|
|
203
|
+
deliverContent(args: ContentDeliveryArgs): Promise<DeliveryResult>;
|
|
204
|
+
createApproval(args: CreateApprovalArgs): Promise<ApprovalRenderResult>;
|
|
205
|
+
editApproval(args: EditApprovalArgs): Promise<ApprovalRenderResult>;
|
|
206
|
+
cancelApproval(args: CancelApprovalArgs): Promise<void>;
|
|
207
|
+
resolveApproval(args: ResolveApprovalArgs): Promise<void>;
|
|
208
|
+
subscribeApprovalResponses(handler: (event: ApprovalResolveEvent) => void): () => void;
|
|
209
|
+
/**
|
|
210
|
+
* Optional threading/editing capabilities. Adapters for providers without
|
|
211
|
+
* threads or message editing omit them; callers MUST feature-detect and
|
|
212
|
+
* fall back to flat channel messages — never error on absence.
|
|
213
|
+
*/
|
|
214
|
+
createThread?(args: CreateThreadArgs): Promise<CreatedThread | null>;
|
|
215
|
+
editMessage?(args: EditChannelMessageArgs): Promise<void>;
|
|
216
|
+
/**
|
|
217
|
+
* OPTIONAL inbound stream (#669 Phase B): human messages from the channel
|
|
218
|
+
* platform, pre-gated by the provider (allowlists fail closed; guild
|
|
219
|
+
* messages mention-gated). Runtimes that handle inbound themselves
|
|
220
|
+
* (OpenClaw) OMIT this member — consumers feature-detect.
|
|
221
|
+
*/
|
|
222
|
+
subscribeInboundMessages?(handler: (message: InboundChannelMessage) => void): () => void;
|
|
223
|
+
/**
|
|
224
|
+
* OPTIONAL ephemeral typing/activity signal (#669 Phase B, D10). Providers
|
|
225
|
+
* without the concept omit it; callers feature-detect and repeat while
|
|
226
|
+
* work runs (platform typing states expire — Discord's after ~10s).
|
|
227
|
+
*/
|
|
228
|
+
sendTyping?(args: {
|
|
229
|
+
channel: string;
|
|
230
|
+
}): Promise<void>;
|
|
231
|
+
}
|