@makinbakin/sdk 0.0.1-rc.20 → 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 (110) hide show
  1. package/_internal/app/components/agent-select.d.ts +10 -1
  2. package/_internal/app/components/asset-picker.d.ts +25 -0
  3. package/_internal/app/components/charts/bar-chart.d.ts +16 -0
  4. package/_internal/app/components/charts/chart-data-table.d.ts +31 -0
  5. package/_internal/app/components/charts/chart-explainer.d.ts +9 -0
  6. package/_internal/app/components/charts/chart-tooltip.d.ts +8 -0
  7. package/_internal/app/components/charts/line-chart.d.ts +13 -0
  8. package/_internal/app/components/charts/palette.d.ts +24 -0
  9. package/_internal/app/components/charts/sparkline.d.ts +12 -0
  10. package/_internal/app/components/charts/stacked-column-chart.d.ts +40 -0
  11. package/_internal/app/components/confirm-dialog.d.ts +23 -2
  12. package/_internal/app/components/conversation/activity-group.d.ts +15 -0
  13. package/_internal/app/components/conversation/agent-turn.d.ts +36 -0
  14. package/_internal/app/components/conversation/attention.d.ts +56 -0
  15. package/_internal/app/components/conversation/composer.d.ts +35 -0
  16. package/_internal/app/components/conversation/conversation-empty-state.d.ts +8 -0
  17. package/_internal/app/components/conversation/conversation-panel.d.ts +33 -0
  18. package/_internal/app/components/conversation/conversation.d.ts +14 -0
  19. package/_internal/app/components/conversation/fold.d.ts +129 -0
  20. package/_internal/app/components/conversation/notification-sound.d.ts +8 -0
  21. package/_internal/app/components/conversation/relative-time.d.ts +8 -0
  22. package/_internal/app/components/conversation/reply-toast.d.ts +15 -0
  23. package/_internal/app/components/conversation/thread-id.d.ts +8 -0
  24. package/_internal/app/components/conversation/tool-call-drawer.d.ts +7 -0
  25. package/_internal/app/components/conversation/turn-recorder.d.ts +37 -0
  26. package/_internal/app/components/conversation/use-conversation-attention.d.ts +64 -0
  27. package/_internal/app/components/conversation/use-conversation-thread.d.ts +55 -0
  28. package/_internal/app/components/conversation/user-message.d.ts +11 -0
  29. package/_internal/app/components/danger-zone.d.ts +28 -0
  30. package/_internal/app/components/empty-state.d.ts +5 -2
  31. package/_internal/app/components/plugin-header.d.ts +4 -3
  32. package/_internal/app/components/save-bar.d.ts +32 -0
  33. package/_internal/app/components/score-overlay.d.ts +33 -0
  34. package/_internal/app/components/search-degraded-chip.d.ts +4 -0
  35. package/_internal/app/components/search-partial-chip.d.ts +13 -0
  36. package/_internal/app/components/search-unavailable.d.ts +12 -0
  37. package/_internal/app/components/section-card.d.ts +22 -0
  38. package/_internal/app/components/segmented-control.d.ts +28 -0
  39. package/_internal/app/components/stat-tile.d.ts +26 -0
  40. package/_internal/app/components/status-badge.d.ts +19 -0
  41. package/_internal/app/components/turn-output-view.d.ts +57 -0
  42. package/_internal/app/components/ui/button.d.ts +1 -1
  43. package/_internal/app/components/underline-tabs.d.ts +6 -2
  44. package/_internal/app/components/unsaved-changes-guard.d.ts +34 -0
  45. package/_internal/app/core/conversation-turns.d.ts +148 -0
  46. package/_internal/app/core/logger.d.ts +1 -0
  47. package/_internal/app/hooks/use-file-drop.d.ts +25 -0
  48. package/_internal/app/hooks/use-history-back.d.ts +1 -0
  49. package/_internal/app/hooks/use-json-fetch.d.ts +5 -0
  50. package/_internal/app/hooks/use-query-state.d.ts +2 -0
  51. package/_internal/app/hooks/use-schedule.d.ts +45 -0
  52. package/_internal/app/hooks/use-search.d.ts +27 -8
  53. package/_internal/app/hooks/use-toast.d.ts +3 -3
  54. package/_internal/app/lib/browser-notify.d.ts +12 -1
  55. package/_internal/core/adapters/runtime/concepts.d.ts +547 -49
  56. package/_internal/core/adapters/runtime/errors.d.ts +13 -1
  57. package/_internal/core/adapters/runtime/helpers.d.ts +19 -0
  58. package/_internal/core/adapters/runtime/index.d.ts +5 -2
  59. package/_internal/core/adapters/runtime/testing.d.ts +79 -0
  60. package/_internal/core/adapters/runtime/turn-activity.d.ts +23 -0
  61. package/_internal/core/adapters/shared.d.ts +122 -12
  62. package/_internal/core/content-dir.d.ts +8 -0
  63. package/_internal/core/docs/route.d.ts +1 -1
  64. package/_internal/core/format/structured.d.ts +44 -0
  65. package/_internal/core/format.d.ts +5 -1
  66. package/_internal/core/media/downscale.d.ts +18 -0
  67. package/_internal/core/media/sharp-loader.d.ts +36 -0
  68. package/_internal/core/plugin-types.d.ts +102 -39
  69. package/_internal/core/routing/define.d.ts +26 -3
  70. package/_internal/core/routing/dispatcher.d.ts +15 -6
  71. package/_internal/core/routing/index.d.ts +1 -1
  72. package/_internal/core/routing/types.d.ts +13 -70
  73. package/_internal/core/storage/atomic-write.d.ts +11 -0
  74. package/_internal/core/tasks/store.d.ts +129 -0
  75. package/_internal/core/tasks/testing.d.ts +2 -0
  76. package/_internal/{plugins/workflows/lib → core/workflows}/notification-channel-registry.d.ts +1 -1
  77. package/_internal/plugins/team/types.d.ts +47 -0
  78. package/_internal/plugins/workflows/hooks/use-notification-channels.d.ts +1 -1
  79. package/components/index.d.ts +87 -19
  80. package/components/index.js +32904 -15368
  81. package/hooks/index.d.ts +24 -4
  82. package/hooks/index.js +837 -561
  83. package/hooks/router.d.ts +20 -4
  84. package/index.d.ts +5 -50
  85. package/index.js +223 -406
  86. package/internal/index.d.ts +70 -0
  87. package/internal/index.js +409 -0
  88. package/package.json +9 -2
  89. package/register.d.ts +19 -1
  90. package/routing/index.js +175 -147
  91. package/slots/index.js +20 -1
  92. package/testing/index.d.ts +122 -0
  93. package/testing/index.js +21874 -0
  94. package/types/index.d.ts +4 -0
  95. package/types/index.js +16 -0
  96. package/utils/index.d.ts +28 -25
  97. package/utils/index.js +279 -263
  98. package/_internal/app/components/integrated-brainstorm/activity.d.ts +0 -23
  99. package/_internal/app/components/integrated-brainstorm/collapsed-header.d.ts +0 -14
  100. package/_internal/app/components/integrated-brainstorm/empty-state.d.ts +0 -5
  101. package/_internal/app/components/integrated-brainstorm/index.d.ts +0 -8
  102. package/_internal/app/components/integrated-brainstorm/input-row.d.ts +0 -16
  103. package/_internal/app/components/integrated-brainstorm/message-list.d.ts +0 -8
  104. package/_internal/app/components/integrated-brainstorm/session.d.ts +0 -16
  105. package/_internal/app/components/integrated-brainstorm/sse.d.ts +0 -8
  106. package/_internal/app/components/integrated-brainstorm/thinking-indicator.d.ts +0 -19
  107. package/_internal/app/components/integrated-brainstorm/types.d.ts +0 -63
  108. package/_internal/app/components/integrated-brainstorm/use-auto-grow.d.ts +0 -6
  109. package/_internal/app/components/integrated-brainstorm/use-brainstorm-state.d.ts +0 -21
  110. /package/_internal/{plugins/models → app}/hooks/use-available-models.d.ts +0 -0
package/hooks/router.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  /**
2
- * `NavigateOptions` accepts `{ scroll?: boolean }` for call-site
3
- * readability; TanStack preserves scroll by default, so the flag is
4
- * accepted-and-ignored.
2
+ * `{ scroll?: boolean }` maps to TanStack's `resetScroll` (PR3 3.3):
3
+ * `push` scrolls to top unless `scroll: false`; `replace` is a state tweak
4
+ * (filters, drawers) and always keeps the scroll position.
5
5
  */
6
6
  interface Router {
7
- push: (url: string, _opts?: {
7
+ push: (url: string, opts?: {
8
8
  scroll?: boolean;
9
9
  }) => void;
10
10
  replace: (url: string, _opts?: {
@@ -16,6 +16,22 @@ interface Router {
16
16
  /** No-op — TanStack prefetches on intent via `defaultPreload`. */
17
17
  prefetch: (_url: string) => void;
18
18
  }
19
+ interface StringNavigationOptions {
20
+ to: string;
21
+ search: Record<string, string>;
22
+ hash: string;
23
+ }
24
+ /**
25
+ * Split a browser-style app URL into TanStack's pathname/search/hash fields.
26
+ * Passing the whole string as `to` makes typed dynamic routes discard their
27
+ * query string, so the shared string router must preserve those fields
28
+ * explicitly.
29
+ *
30
+ * Values pass through as RAW STRINGS — the host router uses plain-string
31
+ * serializers (packages/host/src/lib/search-params.ts), so nothing here
32
+ * needs to counteract JSON quoting, and "123"-shaped ids never coerce.
33
+ */
34
+ export declare function toNavigationOptions(url: string): StringNavigationOptions;
19
35
  /**
20
36
  * `useRouter()` over TanStack Router. Accepts plain URL strings and
21
37
  * bypasses TanStack's typed-path safety on purpose — plugin authors
package/index.d.ts CHANGED
@@ -7,6 +7,9 @@
7
7
  * hooks, and components stay on sub-paths (`/ui`, `/hooks`, `/components`,
8
8
  * `/slots`) to keep the top-level namespace from exploding.
9
9
  *
10
+ * This entry is AUTHOR API ONLY. The host shell's registry/lazy-loading
11
+ * plumbing lives on `@makinbakin/sdk/internal` and is not a public contract.
12
+ *
10
13
  * Sub-paths:
11
14
  * - `@makinbakin/sdk/ui` — shadcn UI primitives (Button, Card, Dialog, ...)
12
15
  * - `@makinbakin/sdk/hooks` — React hooks (useAgent, useSSE, useSearch, ...)
@@ -14,6 +17,7 @@
14
17
  * - `@makinbakin/sdk/slots` — Slot + registerSlot primitive
15
18
  * - `@makinbakin/sdk/types` — full type re-exports
16
19
  * - `@makinbakin/sdk/metadata` — docs-aware contract helpers
20
+ * - `@makinbakin/sdk/testing` — plugin test harness (createTestContext, ...)
17
21
  *
18
22
  * Plugin authors: at build time, mark `@makinbakin/sdk`, `@makinbakin/sdk/*`, and
19
23
  * `react`/`react-dom` as externals. At runtime the browser's import map
@@ -24,62 +28,13 @@
24
28
  export * from './types/index';
25
29
  /** Register a plugin (single-call entry from a plugin's `client.tsx`). */
26
30
  export { registerPlugin } from './register';
27
- /** Tear down all registrations owned by a plugin (used during hot-swap). */
28
- export { unregisterPlugin } from './register';
29
31
  /** Register a cleanup callback fired when the plugin is unregistered. */
30
32
  export { registerPluginCleanup } from './register';
31
- /** Current registry version — bumps on every mutation (for useSyncExternalStore). */
32
- export { getRegistryVersion } from './register';
33
- /** Subscribe to registry-version changes. */
34
- export { subscribeRegistry } from './register';
35
- /** Get every registered nav item across all plugins. */
36
- export { getAllNavItems } from './register';
37
- /** Get a snapshot of the current nav items (non-subscribing). */
38
- export { getNavItemsSnapshot } from './register';
39
- /** Get nav items contributed by a specific plugin. */
40
- export { getPluginNavItems } from './register';
41
33
  /** Set or clear a runtime badge on a plugin-owned nav item. */
42
34
  export { setNavBadge } from './register';
43
35
  /** Read the current badge for a nav item, or undefined if none. */
44
36
  export { getNavBadge } from './register';
45
- /** Stable snapshot of every active nav badge keyed by navItemId. */
46
- export { getNavBadgesSnapshot } from './register';
47
- /** Subscribe to nav-badge mutations (separate channel from `subscribeRegistry`). */
48
- export { subscribeNavBadges } from './register';
49
- /** Look up a specific client route by plugin id + path. */
50
- export { getPluginRoute } from './register';
51
- /** Get all registered client routes (across all plugins). */
52
- export { getPluginRoutes } from './register';
53
- /** Seed a plugin's declarative nav from its manifest (host-side; survives unregisterPlugin). */
54
- export { setManifestNav } from './register';
55
- /** Read the manifest nav currently seeded for a plugin (drift validation). */
56
- export { getManifestNav } from './register';
57
- export type { ClientRouteEntry, MatchedPluginRoute, NavItem, PluginRegistration } from './register';
58
- /** Install the manifest-derived slot/route ownership index for lazy loading (host-side). */
59
- export { configureLazyPlugins } from './lazy/index';
60
- /** Install the demand loader that imports a plugin's client bundle (host-side). */
61
- export { setLazyPluginLoader } from './lazy/index';
62
- /** Report a plugin client's load progress: idle → loading → loaded | error (host-side). */
63
- export { setPluginLoadState } from './lazy/index';
64
- /** Current load state for a plugin client. Unknown plugins report 'idle'. */
65
- export { getPluginLoadState } from './lazy/index';
66
- /** Last load error message for a plugin whose state is 'error', if any. */
67
- export { getPluginLoadError } from './lazy/index';
68
- /** Plugins whose manifests declare the given slot in `contributes.slots`. */
69
- export { getSlotOwners } from './lazy/index';
70
- /** Plugins whose manifest `contributes.routes` patterns match a pathname. */
71
- export { getRouteOwners } from './lazy/index';
72
- /** Ask the host to lazy-load every idle plugin that fills the named slot. */
73
- export { requestSlotPlugins } from './lazy/index';
74
- /** Ask the host to lazy-load every idle plugin whose route patterns match the pathname. */
75
- export { requestRoutePlugins } from './lazy/index';
76
- /** Reset a failed plugin to idle and re-request its client bundle. */
77
- export { retryPluginLoad } from './lazy/index';
78
- /** Monotonic lazy-store version for useSyncExternalStore consumers. */
79
- export { getLazyPluginsVersion } from './lazy/index';
80
- /** Subscribe to lazy-plugin store mutations. Returns an unsubscribe fn. */
81
- export { subscribeLazyPlugins } from './lazy/index';
82
- export type { LazyPluginIndex, PluginLoadState } from './lazy/index';
37
+ export type { NavItem, PluginRegistration } from './register';
83
38
  /** Define a plugin HTTP route with typed input/output schemas. */
84
39
  export { defineRoute } from './routing/index';
85
40
  /** Define a core (non-plugin) HTTP route. */