@makinbakin/sdk 0.0.1-rc.3 → 0.0.1-rc.31
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 +64 -0
- package/_internal/app/components/drawer.d.ts +29 -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 +5 -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-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 +3 -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 +709 -237
- 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 +79 -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 +9 -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/sharp-loader.d.ts +36 -0
- package/_internal/core/plugin-types.d.ts +236 -500
- package/_internal/core/routing/define.d.ts +27 -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/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/selection-navigation.d.ts +5 -0
- package/_internal/ui/behaviors/use-persisted-leading-edge-resize.d.ts +29 -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 +41 -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 +59 -0
- package/_internal/ui/conversation/conversation.d.ts +35 -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/resize-handle.d.ts +13 -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 +25 -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 +86 -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 +20 -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 +151 -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/index.d.ts +73 -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 +31 -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 +47 -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/command.d.ts +36 -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 +24 -0
- package/_internal/ui/primitives/input.d.ts +5 -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 +25 -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 +3 -0
- package/_internal/ui/primitives/tooltip.d.ts +14 -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 +6822 -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 +39 -0
- package/content/markdown-content.d.ts +16 -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 +85 -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 +62 -10
- package/patterns/agent-patterns.d.ts +79 -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 +96 -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 +374 -0
- package/types/index.d.ts +19 -919
- package/types/index.js +1 -0
- package/types/manifest.d.ts +221 -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 +578 -0
- package/ui/index.d.ts +70 -31
- package/ui/index.js +38 -28704
- package/utils/asset-id.d.ts +15 -0
- package/utils/index.d.ts +25 -7
- package/utils/index.js +4 -2098
- package/utils/plugin-fetch.d.ts +23 -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
|
@@ -7,10 +7,10 @@ export interface Toast {
|
|
|
7
7
|
}
|
|
8
8
|
interface ToastStore {
|
|
9
9
|
toasts: Toast[];
|
|
10
|
-
add: (toast: Omit<Toast, 'id'>) =>
|
|
10
|
+
add: (toast: Omit<Toast, 'id'>) => string;
|
|
11
11
|
dismiss: (id: string) => void;
|
|
12
12
|
}
|
|
13
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):
|
|
14
|
+
/** Convenience: call from anywhere without hooks. Returns the toast id for programmatic dismiss. */
|
|
15
|
+
export declare function toast(message: ReactNode, type?: Toast['type'], duration?: number): string;
|
|
16
16
|
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
|
+
}
|