@webskill/chatbot 0.0.2 → 0.2.0

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 CHANGED
@@ -76,27 +76,18 @@ probe (`pnpm test:install-smoke`), against the **published** `.d.ts`.
76
76
  <!-- typecheck: chatbot-minimal.tsx -->
77
77
 
78
78
  ```tsx
79
- import { Chatbot, type ChatbotHostAdapter, type LlmConfig } from '@webskill/chatbot';
79
+ import { Chatbot, type ChatbotHostAdapter } from '@webskill/chatbot';
80
80
  import { OpfsProvider } from '@webskill/sdk/browser';
81
81
  import '@webskill/chatbot/chatbot.css';
82
82
 
83
- // ChatbotHostAdapter: wire storage, skill roots, an LLM config store, and a
84
- // navigation port (openConsole / openConsoleTrace). <Chatbot> constructs its own
85
- // ChatEngine from the adapter; pass config for options like generativeUi.
86
- let saved: LlmConfig | undefined;
87
-
83
+ // ChatbotHostAdapter: wire storage, skill roots and a navigation port
84
+ // (openConsole / openConsoleTrace). <Chatbot> constructs its own ChatEngine
85
+ // from the adapter; pass config for options like generativeUi.
86
+ // Model configuration lives in the runtime config store (config.runtimeConfig):
87
+ // RuntimeConfig.llm.entries holds the model list, llm.defaultId the default one.
88
88
  const adapter: ChatbotHostAdapter = {
89
89
  storage: new OpfsProvider({ rootName: 'my-app' }),
90
90
  skillRoots: ['/skills'],
91
- llmConfig: {
92
- load: async () => saved,
93
- save: async (config) => {
94
- saved = config;
95
- },
96
- clear: async () => {
97
- saved = undefined;
98
- }
99
- },
100
91
  navigation: {
101
92
  openConsole() {
102
93
  /* route to your console surface */
@@ -129,12 +120,32 @@ implementation (OPFS storage, skills, demo/model providers, console embedding).
129
120
 
130
121
  ## Stability
131
122
 
132
- - **`@stable`** `Chatbot`, `ChatbotProps`, `ChatEngine` (public methods),
133
- `CompositeUiBridge`, the i18n dictionary. Covered by semver from 0.1.0.
134
- - **`@experimental`**A2UI/OpenUI/Vercel surface hosts and snapshot hosts,
135
- `VercelPayloadPreview`, `configureA2uiMarkdown`, the `probe*` availability
136
- helpers, `RendererKind` (renamed in 0.4.0), and the `RunSnapshot` format.
137
- These may change between 0.0.x releases.
123
+ Every public export carries a `@stable` or `@experimental` JSDoc tag. The tag is
124
+ part of the checked-in API snapshot (`api-snapshots/chatbot/index.d.ts.snap`),
125
+ so a symbol cannot be quietly downgraded the change shows up in the diff.
126
+
127
+ - **`@stable`** covered by the semver contract from 0.1.0: bug fixes ship in a
128
+ patch, backwards-compatible capabilities in a minor, breaking changes only in
129
+ a major with release notes. This covers the surface you wire a host against:
130
+ `Chatbot`, `ChatEngine`, `ChatbotHostAdapter`, the message/event/session data
131
+ types, `CompositeUiBridge`, the layout, theme and i18n exports, and the shell
132
+ components (`InteractionCard`, `ResultBlocksPro`, `SettingsDrawer`, …).
133
+ - **`@experimental`** — may change in a minor or patch release. Only three kinds
134
+ of symbol qualify, and each one is here for a stated reason:
135
+ - **Non-native renderer tiers** — the A2UI, OpenUI and Vercel surface hosts,
136
+ their snapshot variants, `VercelPayloadPreview`, `SpecInteraction`,
137
+ `configureA2uiMarkdown`, the `probe*` helpers, `RendererKind`,
138
+ `RendererCapability` and `DEFAULT_RENDERER_CAPABILITIES`. Their shape
139
+ tracks upstream ecosystems this package does not own.
140
+ - **Surfaces introduced in this release** — `ChatAttachmentInput` and
141
+ `ChatAttachmentMeta` (multimodal attachments), which no consumer has
142
+ exercised yet.
143
+ - **`RunSnapshot`** — the resume snapshot format, `@experimental` in
144
+ `@webskill/sdk` for the same reason.
145
+
146
+ Anything a README example or the published-`.d.ts` consumer probe imports is
147
+ `@stable` by rule: once we teach a call site, we stop calling it experimental.
148
+ `pnpm lint` enforces that rule against this file.
138
149
 
139
150
  ## License
140
151
 
package/dist/chatbot.css CHANGED
@@ -229,6 +229,9 @@
229
229
  .relative {
230
230
  position: relative;
231
231
  }
232
+ .static {
233
+ position: static;
234
+ }
232
235
  .inset-0 {
233
236
  inset: 0px;
234
237
  }
@@ -322,6 +325,9 @@
322
325
  .my-0 {
323
326
  margin-block: 0px;
324
327
  }
328
+ .my-1 {
329
+ margin-block: var(--spacing);
330
+ }
325
331
  .my-2 {
326
332
  margin-block: calc(var(--spacing) * 2);
327
333
  }
@@ -489,12 +495,18 @@
489
495
  .w-2\.5 {
490
496
  width: calc(var(--spacing) * 2.5);
491
497
  }
498
+ .w-3\.5 {
499
+ width: calc(var(--spacing) * 3.5);
500
+ }
492
501
  .w-5 {
493
502
  width: calc(var(--spacing) * 5);
494
503
  }
495
504
  .w-9 {
496
505
  width: calc(var(--spacing) * 9);
497
506
  }
507
+ .w-40 {
508
+ width: calc(var(--spacing) * 40);
509
+ }
498
510
  .w-72 {
499
511
  width: calc(var(--spacing) * 72);
500
512
  }
@@ -722,6 +734,9 @@
722
734
  border-color: color-mix(in oklab, var(--destructive) 25%, transparent);
723
735
  }
724
736
  }
737
+ .self-center {
738
+ align-self: center;
739
+ }
725
740
  .truncate {
726
741
  overflow: hidden;
727
742
  text-overflow: ellipsis;
@@ -871,6 +886,12 @@
871
886
  .bg-danger-soft {
872
887
  background-color: var(--destructive-soft);
873
888
  }
889
+ .bg-danger\/10 {
890
+ background-color: var(--destructive);
891
+ @supports (color: color-mix(in lab, red, red)) {
892
+ background-color: color-mix(in oklab, var(--destructive) 10%, transparent);
893
+ }
894
+ }
874
895
  .bg-destructive {
875
896
  background-color: var(--destructive);
876
897
  }
@@ -1033,6 +1054,9 @@
1033
1054
  .ps-9 {
1034
1055
  padding-inline-start: calc(var(--spacing) * 9);
1035
1056
  }
1057
+ .pt-0\.5 {
1058
+ padding-top: calc(var(--spacing) * 0.5);
1059
+ }
1036
1060
  .pt-2 {
1037
1061
  padding-top: calc(var(--spacing) * 2);
1038
1062
  }
@@ -1051,6 +1075,9 @@
1051
1075
  .pr-8 {
1052
1076
  padding-right: calc(var(--spacing) * 8);
1053
1077
  }
1078
+ .pb-1 {
1079
+ padding-bottom: var(--spacing);
1080
+ }
1054
1081
  .pb-3 {
1055
1082
  padding-bottom: calc(var(--spacing) * 3);
1056
1083
  }
@@ -1204,15 +1231,15 @@
1204
1231
  --tw-numeric-spacing: tabular-nums;
1205
1232
  font-variant-numeric: var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,);
1206
1233
  }
1234
+ .line-through {
1235
+ text-decoration-line: line-through;
1236
+ }
1207
1237
  .underline {
1208
1238
  text-decoration-line: underline;
1209
1239
  }
1210
1240
  .underline-offset-4 {
1211
1241
  text-underline-offset: 4px;
1212
1242
  }
1213
- .accent-primary {
1214
- accent-color: var(--primary);
1215
- }
1216
1243
  .opacity-0 {
1217
1244
  opacity: 0%;
1218
1245
  }
@@ -1497,6 +1524,9 @@
1497
1524
  opacity: 85%;
1498
1525
  }
1499
1526
  }
1527
+ .focus\:border-ring:focus {
1528
+ border-color: var(--ring);
1529
+ }
1500
1530
  .focus-visible\:border-ring:focus-visible {
1501
1531
  border-color: var(--ring);
1502
1532
  }