@makinbakin/sdk 0.0.1-rc.2 → 0.0.1-rc.21

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.
Files changed (125) hide show
  1. package/README.md +1 -0
  2. package/_internal/app/components/agent-select.d.ts +16 -2
  3. package/_internal/app/components/asset-picker.d.ts +25 -0
  4. package/_internal/app/components/charts/bar-chart.d.ts +16 -0
  5. package/_internal/app/components/charts/chart-data-table.d.ts +31 -0
  6. package/_internal/app/components/charts/chart-explainer.d.ts +9 -0
  7. package/_internal/app/components/charts/chart-tooltip.d.ts +8 -0
  8. package/_internal/app/components/charts/line-chart.d.ts +13 -0
  9. package/_internal/app/components/charts/palette.d.ts +24 -0
  10. package/_internal/app/components/charts/sparkline.d.ts +12 -0
  11. package/_internal/app/components/charts/stacked-column-chart.d.ts +40 -0
  12. package/_internal/app/components/confirm-dialog.d.ts +54 -0
  13. package/_internal/app/components/conversation/activity-group.d.ts +15 -0
  14. package/_internal/app/components/conversation/agent-turn.d.ts +36 -0
  15. package/_internal/app/components/conversation/attention.d.ts +56 -0
  16. package/_internal/app/components/conversation/composer.d.ts +35 -0
  17. package/_internal/app/components/conversation/conversation-empty-state.d.ts +8 -0
  18. package/_internal/app/components/conversation/conversation-panel.d.ts +33 -0
  19. package/_internal/app/components/conversation/conversation.d.ts +14 -0
  20. package/_internal/app/components/conversation/fold.d.ts +129 -0
  21. package/_internal/app/components/conversation/notification-sound.d.ts +8 -0
  22. package/_internal/app/components/conversation/relative-time.d.ts +8 -0
  23. package/_internal/app/components/conversation/reply-toast.d.ts +15 -0
  24. package/_internal/app/components/conversation/thread-id.d.ts +8 -0
  25. package/_internal/app/components/conversation/tool-call-drawer.d.ts +7 -0
  26. package/_internal/app/components/conversation/turn-recorder.d.ts +37 -0
  27. package/_internal/app/components/conversation/use-conversation-attention.d.ts +64 -0
  28. package/_internal/app/components/conversation/use-conversation-thread.d.ts +55 -0
  29. package/_internal/app/components/conversation/user-message.d.ts +11 -0
  30. package/_internal/app/components/danger-zone.d.ts +28 -0
  31. package/_internal/app/components/empty-state.d.ts +18 -6
  32. package/_internal/app/components/plugin-header.d.ts +4 -3
  33. package/_internal/app/components/save-bar.d.ts +32 -0
  34. package/_internal/app/components/score-overlay.d.ts +33 -0
  35. package/_internal/app/components/search-degraded-chip.d.ts +4 -0
  36. package/_internal/app/components/search-partial-chip.d.ts +13 -0
  37. package/_internal/app/components/search-unavailable.d.ts +12 -0
  38. package/_internal/app/components/section-card.d.ts +22 -0
  39. package/_internal/app/components/segmented-control.d.ts +28 -0
  40. package/_internal/app/components/stat-tile.d.ts +26 -0
  41. package/_internal/app/components/status-badge.d.ts +19 -0
  42. package/_internal/app/components/turn-output-view.d.ts +57 -0
  43. package/_internal/app/components/ui/badge.d.ts +1 -1
  44. package/_internal/app/components/ui/button.d.ts +1 -1
  45. package/_internal/app/components/underline-tabs.d.ts +6 -2
  46. package/_internal/app/components/unsaved-changes-guard.d.ts +34 -0
  47. package/_internal/app/core/conversation-turns.d.ts +148 -0
  48. package/_internal/app/core/logger.d.ts +1 -0
  49. package/_internal/app/hooks/use-available-models.d.ts +5 -0
  50. package/_internal/app/hooks/use-content-store.d.ts +0 -9
  51. package/_internal/app/hooks/use-file-drop.d.ts +25 -0
  52. package/_internal/app/hooks/use-history-back.d.ts +1 -0
  53. package/_internal/app/hooks/use-horizontal-resize.d.ts +22 -0
  54. package/_internal/app/hooks/use-json-fetch.d.ts +26 -0
  55. package/_internal/app/hooks/use-nav-badge.d.ts +13 -0
  56. package/_internal/app/hooks/use-plugin-event.d.ts +19 -0
  57. package/_internal/app/hooks/use-query-state.d.ts +2 -0
  58. package/_internal/app/hooks/use-resizable-pane.d.ts +35 -0
  59. package/_internal/app/hooks/use-schedule.d.ts +47 -1
  60. package/_internal/app/hooks/use-search.d.ts +27 -8
  61. package/_internal/app/hooks/use-task-run-history.d.ts +26 -0
  62. package/_internal/app/hooks/use-toast.d.ts +3 -3
  63. package/_internal/app/hooks/use-vertical-resize.d.ts +6 -7
  64. package/_internal/app/lib/browser-notify.d.ts +12 -1
  65. package/_internal/app/types/index.d.ts +1 -105
  66. package/_internal/core/adapters/runtime/concepts.d.ts +671 -99
  67. package/_internal/core/adapters/runtime/errors.d.ts +98 -0
  68. package/_internal/core/adapters/runtime/helpers.d.ts +19 -0
  69. package/_internal/core/adapters/runtime/index.d.ts +7 -2
  70. package/_internal/core/adapters/runtime/testing.d.ts +79 -0
  71. package/_internal/core/adapters/runtime/turn-activity.d.ts +23 -0
  72. package/_internal/core/adapters/shared.d.ts +122 -12
  73. package/_internal/core/content-dir.d.ts +9 -0
  74. package/_internal/core/docs/route.d.ts +1 -1
  75. package/_internal/core/format/structured.d.ts +44 -0
  76. package/_internal/core/format.d.ts +13 -0
  77. package/_internal/core/media/downscale.d.ts +18 -0
  78. package/_internal/core/media/sharp-loader.d.ts +36 -0
  79. package/_internal/core/plugin-types.d.ts +216 -499
  80. package/_internal/core/routing/define.d.ts +26 -3
  81. package/_internal/core/routing/dispatcher.d.ts +15 -6
  82. package/_internal/core/routing/index.d.ts +1 -1
  83. package/_internal/core/routing/types.d.ts +13 -70
  84. package/_internal/core/storage/atomic-write.d.ts +11 -0
  85. package/_internal/core/tasks/store.d.ts +129 -0
  86. package/_internal/core/tasks/testing.d.ts +2 -0
  87. package/_internal/{plugins/workflows/lib → core/workflows}/notification-channel-registry.d.ts +1 -1
  88. package/_internal/plugins/team/types.d.ts +61 -4
  89. package/_internal/plugins/workflows/hooks/use-notification-channels.d.ts +1 -1
  90. package/components/index.d.ts +111 -5
  91. package/components/index.js +61815 -30060
  92. package/hooks/index.d.ts +90 -9
  93. package/hooks/index.js +15181 -685
  94. package/hooks/router.d.ts +20 -4
  95. package/index.d.ts +20 -3
  96. package/index.js +297 -259
  97. package/internal/index.d.ts +70 -0
  98. package/internal/index.js +409 -0
  99. package/metadata/index.d.ts +14 -1
  100. package/package.json +9 -2
  101. package/register.d.ts +63 -9
  102. package/routing/index.d.ts +6 -1
  103. package/routing/index.js +187 -147
  104. package/slots/index.d.ts +16 -24
  105. package/slots/index.js +215 -30
  106. package/testing/index.d.ts +122 -0
  107. package/testing/index.js +21874 -0
  108. package/types/index.d.ts +19 -919
  109. package/types/index.js +16 -0
  110. package/ui/index.js +2 -1
  111. package/utils/index.d.ts +46 -6
  112. package/utils/index.js +322 -249
  113. package/_internal/app/components/integrated-brainstorm/activity.d.ts +0 -23
  114. package/_internal/app/components/integrated-brainstorm/collapsed-header.d.ts +0 -14
  115. package/_internal/app/components/integrated-brainstorm/empty-state.d.ts +0 -5
  116. package/_internal/app/components/integrated-brainstorm/index.d.ts +0 -8
  117. package/_internal/app/components/integrated-brainstorm/input-row.d.ts +0 -16
  118. package/_internal/app/components/integrated-brainstorm/message-list.d.ts +0 -8
  119. package/_internal/app/components/integrated-brainstorm/session.d.ts +0 -16
  120. package/_internal/app/components/integrated-brainstorm/sse.d.ts +0 -8
  121. package/_internal/app/components/integrated-brainstorm/thinking-indicator.d.ts +0 -19
  122. package/_internal/app/components/integrated-brainstorm/types.d.ts +0 -63
  123. package/_internal/app/components/integrated-brainstorm/use-auto-grow.d.ts +0 -6
  124. package/_internal/app/components/integrated-brainstorm/use-brainstorm-state.d.ts +0 -21
  125. package/_internal/app/hooks/use-assets.d.ts +0 -25
package/hooks/index.d.ts CHANGED
@@ -5,21 +5,102 @@
5
5
  * 1. Bakin-wide hooks from `src/hooks/*` (SSE, search, query-state, debug, etc.)
6
6
  * 2. Cross-plugin hooks from `plugins/team/hooks/*` (agent data)
7
7
  * 3. Cross-plugin hooks from `plugins/workflows/hooks/*` (notification channels)
8
+ *
9
+ * DELIBERATE ARRANGEMENT (audit P2 #5, decided 2026-07 in FW3): groups 2-3
10
+ * reach into plugin source on purpose. Each hook's wire contract (the
11
+ * `/api/plugins/<id>/...` routes it fetches) is owned by its plugin, so the
12
+ * implementation lives WITH that contract; the SDK re-export exists so
13
+ * external authors get one import surface. The npm publish build BUNDLES
14
+ * these sources into the package and `assertNoForbiddenImports`
15
+ * (scripts/build-sdk-package.ts) fails the release if any `@bakin/*`
16
+ * specifier survives — the published SDK is self-contained. Moving the
17
+ * implementations into the SDK would decouple them from the routes they
18
+ * call, which is the worse drift.
8
19
  */
9
- export { useAssets, useTrash } from '../_internal/app/hooks/use-assets';
20
+ /** Access the global Zustand store for SSE-driven content state. */
10
21
  export { useContentStore } from '../_internal/app/hooks/use-content-store';
22
+ /** Sync a nav item's badge to a derived value; the recommended provider glue. */
23
+ export { useNavBadge } from '../_internal/app/hooks/use-nav-badge';
24
+ /** Read/toggle the global debug (X-Ray) flag. */
11
25
  export { useDebug } from '../_internal/app/hooks/use-debug';
26
+ /** Guard a form against unmounting while submission is in flight. */
12
27
  export { useFormGuard } from '../_internal/app/hooks/use-form-guard';
28
+ /** Cancellable JSON GET with a `{ data, loading, error, refresh }` lifecycle. */
29
+ export { useJsonFetch, usePluginJsonFetch } from '../_internal/app/hooks/use-json-fetch';
30
+ export type { UseJsonFetchResult } from '../_internal/app/hooks/use-json-fetch';
31
+ /** Subscribe to runtime connection status (online/offline, last heartbeat). */
13
32
  export { useRuntimeStatus } from '../_internal/app/hooks/use-runtime-status';
14
- export { useQueryState, useQueryArrayState } from '../_internal/app/hooks/use-query-state';
15
- export { useScheduleJobs, useRunHistory } from '../_internal/app/hooks/use-schedule';
16
- export type { ScheduleJob, RunEntry } from '../_internal/app/hooks/use-schedule';
17
- export { useSearch, reorderBySearchResults } from '../_internal/app/hooks/use-search';
33
+ /** Bind a single component-state value to a URL query param. */
34
+ export { useQueryState } from '../_internal/app/hooks/use-query-state';
35
+ /** Bind a multi-value (array) component state to a URL query param. */
36
+ export { useQueryArrayState } from '../_internal/app/hooks/use-query-state';
37
+ /** List scheduled jobs with live updates. */
38
+ export { useScheduleJobs } from '../_internal/app/hooks/use-schedule';
39
+ /** Fetch run history for a scheduled job. */
40
+ export { useRunHistory } from '../_internal/app/hooks/use-schedule';
41
+ export { useOccurrences } from '../_internal/app/hooks/use-schedule';
42
+ export type { ScheduleJob, RunEntry, ScheduleOccurrence, ScheduledDomainEvent } from '../_internal/app/hooks/use-schedule';
43
+ /** Fetch dispatch run history for a task. */
44
+ export { useTaskRunHistory } from '../_internal/app/hooks/use-task-run-history';
45
+ export type { TaskOutcome, TaskRunEntry } from '../_internal/app/hooks/use-task-run-history';
46
+ /** Hybrid full-text + semantic search across plugins with facet filtering. */
47
+ export { useSearch } from '../_internal/app/hooks/use-search';
48
+ /** Query-path warm signal ('cold' | 'warming' | 'warm') for search-bar UI. */
49
+ /** Re-rank a local list to match the order returned by a search query. */
50
+ export { reorderBySearchResults } from '../_internal/app/hooks/use-search';
18
51
  export type { SearchResult, SearchResponse, UseSearchOptions, UseSearchReturn } from '../_internal/app/hooks/use-search';
52
+ /** Read sidebar open/closed state and toggle helper. */
19
53
  export { useSidebar } from '../_internal/app/hooks/use-sidebar';
54
+ /** Subscribe to a Server-Sent Events endpoint with auto-reconnect. */
20
55
  export { useSSE } from '../_internal/app/hooks/use-sse';
21
- export { toast, useToastStore } from '../_internal/app/hooks/use-toast';
56
+ /** Subscribe to a server-pushed plugin event over the shell's single connection. */
57
+ export { usePluginEvent, emitPluginEvent, type PluginEventPayload } from '../_internal/app/hooks/use-plugin-event';
58
+ /** Headless drag-drop file intake (drag-over state + handlers + accept filter) — style your own zone. */
59
+ export { useFileDrop } from '../_internal/app/hooks/use-file-drop';
60
+ export type { UseFileDropOptions, UseFileDropResult } from '../_internal/app/hooks/use-file-drop';
61
+ /** History-aware back for detail surfaces reachable from many places — real back() with a fallback route for cold deep-links. */
62
+ export { useHistoryBack } from '../_internal/app/hooks/use-history-back';
63
+ /** Fire a toast notification (success/error/info). */
64
+ export { toast } from '../_internal/app/hooks/use-toast';
65
+ /** Subscribe to the toast store for custom toast UIs. */
66
+ export { useToastStore } from '../_internal/app/hooks/use-toast';
67
+ /** Imperatively resize a vertical pane via mouse drag handle. */
22
68
  export { useVerticalResize } from '../_internal/app/hooks/use-vertical-resize';
23
- export { useAgentStore, useAgent, useAgentList, useAgentColor, useAgentDisplayName, useAgentIds, useMainAgentId, usePackageState, hexToMuted, } from '../_internal/plugins/team/hooks/use-agent-store';
24
- export { useNotificationChannels, getChannelLabel, getChannelInitials, } from '../_internal/plugins/workflows/hooks/use-notification-channels';
25
- export { useRouter, usePathname, useSearchParams, useParams } from './router';
69
+ /** Resize a side-by-side split pane by dragging the divider between columns. */
70
+ export { useHorizontalResize } from '../_internal/app/hooks/use-horizontal-resize';
71
+ /** Access the agent registry store (Zustand). */
72
+ export { useAgentStore } from '../_internal/plugins/team/hooks/use-agent-store';
73
+ /** Look up a single agent by ID. */
74
+ export { useAgent } from '../_internal/plugins/team/hooks/use-agent-store';
75
+ /** List all registered agents. */
76
+ export { useAgentList } from '../_internal/plugins/team/hooks/use-agent-store';
77
+ /** Get an agent's brand color (hex string). */
78
+ export { useAgentColor } from '../_internal/plugins/team/hooks/use-agent-store';
79
+ /** Get an agent's display name (fallback to ID). */
80
+ export { useAgentDisplayName } from '../_internal/plugins/team/hooks/use-agent-store';
81
+ /** List all registered agent IDs. */
82
+ export { useAgentIds } from '../_internal/plugins/team/hooks/use-agent-store';
83
+ /** Get the ID of the designated main/orchestrator agent. */
84
+ export { useMainAgentId } from '../_internal/plugins/team/hooks/use-agent-store';
85
+ /** Read agent-package install state (managed/unmanaged). */
86
+ export { usePackageState } from '../_internal/plugins/team/hooks/use-agent-store';
87
+ /** Convert a hex color to a muted variant for backgrounds. */
88
+ export { hexToMuted } from '../_internal/plugins/team/hooks/use-agent-store';
89
+ /** List configured notification channels (Discord, Slack, email, etc.). */
90
+ export { useNotificationChannels } from '../_internal/plugins/workflows/hooks/use-notification-channels';
91
+ /** Get a human-readable label for a channel ID. */
92
+ export { getChannelLabel } from '../_internal/plugins/workflows/hooks/use-notification-channels';
93
+ /** Get initials for a channel (e.g. "Discord" → "D"). */
94
+ export { getChannelInitials } from '../_internal/plugins/workflows/hooks/use-notification-channels';
95
+ /** The available-models catalog (cached, read-only); empty until loaded. */
96
+ export { useAvailableModels } from '../_internal/app/hooks/use-available-models';
97
+ /** Access the TanStack Router instance for imperative navigation. */
98
+ export { useRouter } from './router';
99
+ /** Current URL pathname (Next.js-shape compatible). */
100
+ export { usePathname } from './router';
101
+ /** Current URL search params as a URLSearchParams instance. */
102
+ export { useSearchParams } from './router';
103
+ /** Current route's typed path parameters. */
104
+ export { useParams } from './router';
105
+ /** Split a browser-style URL string into TanStack navigate options (non-hook). */
106
+ export { toNavigationOptions } from './router';