@cms.ai/brand_brain 0.0.1 → 0.1.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 +165 -38
- package/dist/index.cjs +272 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +560 -16
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +560 -16
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +261 -10
- package/dist/index.mjs.map +1 -1
- package/dist/react/index.cjs +261 -13
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +579 -20
- package/dist/react/index.d.cts.map +1 -1
- package/dist/react/index.d.mts +579 -20
- package/dist/react/index.d.mts.map +1 -1
- package/dist/react/index.mjs +261 -13
- package/dist/react/index.mjs.map +1 -1
- package/llms.txt +115 -0
- package/package.json +6 -5
- package/src/GuideClient.test.ts +28 -0
- package/src/GuideClient.ts +24 -3
- package/src/chat-stream.test.ts +28 -0
- package/src/chat-stream.ts +28 -3
- package/src/index.ts +2 -0
- package/src/react/index.ts +1 -1
- package/src/react/useGuide.ts +107 -6
- package/src/skill-state.test.ts +144 -0
- package/src/skill-state.ts +206 -0
- package/src/types.ts +504 -17
package/dist/index.d.mts
CHANGED
|
@@ -10,7 +10,11 @@ declare const SSEMessageType: {
|
|
|
10
10
|
readonly Custom: "CUSTOM";
|
|
11
11
|
};
|
|
12
12
|
type SSEMessageTypeName = (typeof SSEMessageType)[keyof typeof SSEMessageType];
|
|
13
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* The `name` on `CUSTOM` guide events (skill payloads). `SkillGate` and
|
|
15
|
+
* `SkillError` never surface as `skill` stream events — the SDK re-maps them to
|
|
16
|
+
* the dedicated `gate` / `error` {@link GuideStreamEvent} variants.
|
|
17
|
+
*/
|
|
14
18
|
declare const GuideEvent: {
|
|
15
19
|
readonly SkillStart: "skill_start";
|
|
16
20
|
readonly SkillContent: "skill_content";
|
|
@@ -31,7 +35,6 @@ declare const GuideEvent: {
|
|
|
31
35
|
readonly SkillEnd: "skill_end";
|
|
32
36
|
readonly SkillError: "skill_error";
|
|
33
37
|
readonly SkillGate: "skill_gate";
|
|
34
|
-
readonly InputSuggestions: "input_suggestions";
|
|
35
38
|
};
|
|
36
39
|
type GuideEventName = (typeof GuideEvent)[keyof typeof GuideEvent];
|
|
37
40
|
/** The guide skill types. `answer` is always on; the rest are enabled per-guide. */
|
|
@@ -106,9 +109,63 @@ interface GuideGraphSnapshot {
|
|
|
106
109
|
}>;
|
|
107
110
|
}
|
|
108
111
|
/**
|
|
109
|
-
*
|
|
110
|
-
*
|
|
112
|
+
* The guide's brand theme — shadcn-style design tokens as CSS color strings
|
|
113
|
+
* (hex or `oklch(...)`). Every property is optional: absent tokens mean "keep
|
|
114
|
+
* your default". Map them onto your CSS variables / Tailwind theme so the
|
|
115
|
+
* guide UI matches the brand:
|
|
116
|
+
*
|
|
117
|
+
* ```css
|
|
118
|
+
* :root {
|
|
119
|
+
* --primary: <theme.primary>;
|
|
120
|
+
* --background: <theme.background>;
|
|
121
|
+
* }
|
|
122
|
+
* ```
|
|
111
123
|
*/
|
|
124
|
+
interface BrandKitTheme {
|
|
125
|
+
/** Main brand color (buttons, focus rings) */
|
|
126
|
+
primary?: string;
|
|
127
|
+
/** Text on primary backgrounds */
|
|
128
|
+
primaryForeground?: string;
|
|
129
|
+
/** Secondary surface color */
|
|
130
|
+
secondary?: string;
|
|
131
|
+
/** Text on secondary surfaces */
|
|
132
|
+
secondaryForeground?: string;
|
|
133
|
+
/** Main page background */
|
|
134
|
+
background?: string;
|
|
135
|
+
/** Default body text */
|
|
136
|
+
foreground?: string;
|
|
137
|
+
/** Muted areas, borders, inputs */
|
|
138
|
+
muted?: string;
|
|
139
|
+
/** Muted/secondary text */
|
|
140
|
+
mutedForeground?: string;
|
|
141
|
+
/** Border color */
|
|
142
|
+
border?: string;
|
|
143
|
+
/** Input border color */
|
|
144
|
+
input?: string;
|
|
145
|
+
/** Focus ring color */
|
|
146
|
+
ring?: string;
|
|
147
|
+
}
|
|
148
|
+
/** How a brand kit colors the guide's skill icons. */
|
|
149
|
+
declare const SkillIconColorMode: {
|
|
150
|
+
/** Keep the built-in per-skill colors. */readonly Default: "default"; /** Apply a single brand color to every skill icon. */
|
|
151
|
+
readonly Mono: "mono"; /** Pick a color per skill; skills left unset fall back to the default. */
|
|
152
|
+
readonly PerSkill: "per_skill";
|
|
153
|
+
};
|
|
154
|
+
type SkillIconColorModeType = (typeof SkillIconColorMode)[keyof typeof SkillIconColorMode];
|
|
155
|
+
/**
|
|
156
|
+
* Per-brand-kit skill icon color customization, discriminated on `mode`.
|
|
157
|
+
* Colors are CSS color strings (same format as {@link BrandKitTheme}).
|
|
158
|
+
*/
|
|
159
|
+
type SkillIconStyle = {
|
|
160
|
+
mode: typeof SkillIconColorMode.Default;
|
|
161
|
+
} | {
|
|
162
|
+
mode: typeof SkillIconColorMode.Mono; /** Single color applied to every skill icon. */
|
|
163
|
+
monoColor: string;
|
|
164
|
+
} | {
|
|
165
|
+
mode: typeof SkillIconColorMode.PerSkill; /** Color per skill; missing keys fall back to the default. */
|
|
166
|
+
colors: Partial<Record<SkillResponseTypeType, string>>;
|
|
167
|
+
};
|
|
168
|
+
/** Resolved guide metadata returned by `guides.resolve`. */
|
|
112
169
|
interface ResolvedGuide {
|
|
113
170
|
id: string;
|
|
114
171
|
name: string;
|
|
@@ -121,8 +178,9 @@ interface ResolvedGuide {
|
|
|
121
178
|
advancedSettings: {
|
|
122
179
|
gatePdfDownload: boolean;
|
|
123
180
|
};
|
|
124
|
-
|
|
125
|
-
|
|
181
|
+
/** Brand design tokens — apply to your UI so the guide matches the brand. */
|
|
182
|
+
theme: BrandKitTheme | null;
|
|
183
|
+
skillIconStyle: SkillIconStyle | null;
|
|
126
184
|
faviconUrl: string | null;
|
|
127
185
|
logoUrl: string | null;
|
|
128
186
|
heroImageUrl: string | null;
|
|
@@ -156,7 +214,12 @@ interface ConversationWithMessages {
|
|
|
156
214
|
conversation: Conversation;
|
|
157
215
|
messages: ConversationMessage[];
|
|
158
216
|
}
|
|
159
|
-
/**
|
|
217
|
+
/**
|
|
218
|
+
* A persisted skill deliverable. `data` shape varies by `type` — it is the
|
|
219
|
+
* skill's completed output (e.g. for `howto` a `{ title, steps: HowToStep[] }`
|
|
220
|
+
* record); the streamed payload interfaces in this file describe the same
|
|
221
|
+
* building blocks.
|
|
222
|
+
*/
|
|
160
223
|
interface SkillInstance {
|
|
161
224
|
id: string;
|
|
162
225
|
skillOutputId: string;
|
|
@@ -250,8 +313,10 @@ interface InitGuideConfig {
|
|
|
250
313
|
/** Guide slug to resolve (e.g. "default"). */
|
|
251
314
|
slug: string;
|
|
252
315
|
/**
|
|
253
|
-
*
|
|
254
|
-
*
|
|
316
|
+
* Optional override for the host used in account resolution + attribution.
|
|
317
|
+
* Defaults to the `baseUrl` hostname (lowercased, `www.`/port stripped), which
|
|
318
|
+
* is the registered account domain. Only set this if resolution must key off a
|
|
319
|
+
* different registered domain than the one requests are sent to.
|
|
255
320
|
*/
|
|
256
321
|
domain?: string;
|
|
257
322
|
/**
|
|
@@ -282,10 +347,415 @@ interface AskOptions {
|
|
|
282
347
|
/** Abort the in-flight stream. */
|
|
283
348
|
signal?: AbortSignal;
|
|
284
349
|
}
|
|
350
|
+
/** Kind of content a document/playlist item points at. */
|
|
351
|
+
declare const ContentType: {
|
|
352
|
+
readonly PDF: "pdf";
|
|
353
|
+
readonly DOCX: "docx";
|
|
354
|
+
readonly PPTX: "pptx";
|
|
355
|
+
readonly Image: "image";
|
|
356
|
+
readonly VideoNative: "video_native";
|
|
357
|
+
readonly VideoYouTube: "video_youtube";
|
|
358
|
+
readonly VideoWistia: "video_wistia";
|
|
359
|
+
readonly Document: "document";
|
|
360
|
+
readonly URL: "url";
|
|
361
|
+
readonly Text: "text";
|
|
362
|
+
readonly Markdown: "markdown";
|
|
363
|
+
};
|
|
364
|
+
type ContentTypeName = (typeof ContentType)[keyof typeof ContentType];
|
|
365
|
+
/**
|
|
366
|
+
* Document reference streamed with a reply — the sources behind the answer.
|
|
367
|
+
* Render as source cards/citations: title, optional link, optional thumbnail.
|
|
368
|
+
*/
|
|
369
|
+
interface GuideDocument {
|
|
370
|
+
id: string;
|
|
371
|
+
title: string;
|
|
372
|
+
tag?: string;
|
|
373
|
+
/** Lucide icon name. */
|
|
374
|
+
icon?: string;
|
|
375
|
+
url?: string;
|
|
376
|
+
contentType?: ContentTypeName;
|
|
377
|
+
body?: string;
|
|
378
|
+
thumbnailUrl?: string;
|
|
379
|
+
/** 1-based citation number matching the [N] references in the reply text. Undefined if the document was not part of the reply context. */
|
|
380
|
+
citationIndex?: number;
|
|
381
|
+
}
|
|
382
|
+
/** Confidence level attached to a content recommendation. */
|
|
383
|
+
declare const Confidence: {
|
|
384
|
+
readonly High: "high";
|
|
385
|
+
readonly Medium: "medium";
|
|
386
|
+
readonly Low: "low";
|
|
387
|
+
};
|
|
388
|
+
type ConfidenceName = (typeof Confidence)[keyof typeof Confidence];
|
|
389
|
+
/**
|
|
390
|
+
* Follow-up recommendation to invoke a skill — render as a pill button that
|
|
391
|
+
* calls `ask(prompt, { forcedSkill: skill })`.
|
|
392
|
+
*/
|
|
393
|
+
interface SkillRecommendation {
|
|
394
|
+
id: string;
|
|
395
|
+
skill: SkillResponseTypeType;
|
|
396
|
+
label: string;
|
|
397
|
+
prompt: string;
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* A content recommendation generated by the recommend skill — render as a card
|
|
401
|
+
* whose click calls `ask(prompt, { forcedSkill: targetSkill })`.
|
|
402
|
+
*/
|
|
403
|
+
interface ContentRecommendation {
|
|
404
|
+
id: string;
|
|
405
|
+
targetSkill: Exclude<SkillResponseTypeType, "recommend">;
|
|
406
|
+
title: string;
|
|
407
|
+
rationale: string;
|
|
408
|
+
prompt: string;
|
|
409
|
+
confidence: ConfidenceName;
|
|
410
|
+
}
|
|
411
|
+
/** The render kind of a surfaced call-to-action. */
|
|
412
|
+
declare const SkillCtaKind: {
|
|
413
|
+
readonly Url: "url";
|
|
414
|
+
readonly Form: "form";
|
|
415
|
+
readonly Product: "product";
|
|
416
|
+
readonly Scheduler: "scheduler";
|
|
417
|
+
};
|
|
418
|
+
type SkillCtaKindName = (typeof SkillCtaKind)[keyof typeof SkillCtaKind];
|
|
419
|
+
/** Where a surfaced CTA renders. One slot today: below the skill response. */
|
|
420
|
+
declare const CtaPlacement: {
|
|
421
|
+
readonly ResponseFooter: "response_footer";
|
|
422
|
+
};
|
|
423
|
+
type CtaPlacementName = (typeof CtaPlacement)[keyof typeof CtaPlacement];
|
|
424
|
+
/** Which scheduler embed a scheduler CTA loads. */
|
|
425
|
+
declare const SchedulerProvider: {
|
|
426
|
+
readonly HubSpot: "hubspot";
|
|
427
|
+
readonly Calendly: "calendly";
|
|
428
|
+
};
|
|
429
|
+
type SchedulerProviderName = (typeof SchedulerProvider)[keyof typeof SchedulerProvider];
|
|
430
|
+
/**
|
|
431
|
+
* A call-to-action surfaced for a turn, discriminated on `kind`:
|
|
432
|
+
* - `url`: external link — render a button that opens `href`.
|
|
433
|
+
* - `form`: in-guide form — render a button/banner for the form `formId`.
|
|
434
|
+
* - `product`: product recommendation — render a link/card to `href`.
|
|
435
|
+
* - `scheduler`: meeting embed — render a button that opens `url` in the
|
|
436
|
+
* provider's scheduling widget (or a new tab).
|
|
437
|
+
*
|
|
438
|
+
* Only render the first CTA in the list; the wire carries a list for forward
|
|
439
|
+
* compatibility. `ctaInstanceId` (when present) should be echoed on CTA
|
|
440
|
+
* analytics events so impressions and clicks join up.
|
|
441
|
+
*/
|
|
442
|
+
type SkillCTA = {
|
|
443
|
+
kind: typeof SkillCtaKind.Url;
|
|
444
|
+
placement: CtaPlacementName;
|
|
445
|
+
ctaId: string | null;
|
|
446
|
+
label: string;
|
|
447
|
+
href: string; /** Custom banner heading; absent → use a default like "Recommended next step". */
|
|
448
|
+
bannerText?: string; /** Lucide icon name; absent → a default lightbulb. */
|
|
449
|
+
bannerIcon?: string;
|
|
450
|
+
ctaInstanceId?: string;
|
|
451
|
+
} | {
|
|
452
|
+
kind: typeof SkillCtaKind.Form;
|
|
453
|
+
placement: CtaPlacementName;
|
|
454
|
+
ctaId: string;
|
|
455
|
+
label: string;
|
|
456
|
+
formId: string;
|
|
457
|
+
bannerText?: string;
|
|
458
|
+
bannerIcon?: string;
|
|
459
|
+
ctaInstanceId?: string;
|
|
460
|
+
} | {
|
|
461
|
+
kind: typeof SkillCtaKind.Product;
|
|
462
|
+
placement: CtaPlacementName;
|
|
463
|
+
productId: string;
|
|
464
|
+
label: string;
|
|
465
|
+
href: string;
|
|
466
|
+
ctaInstanceId?: string;
|
|
467
|
+
} | {
|
|
468
|
+
kind: typeof SkillCtaKind.Scheduler;
|
|
469
|
+
placement: CtaPlacementName;
|
|
470
|
+
ctaId: string;
|
|
471
|
+
label: string;
|
|
472
|
+
provider: SchedulerProviderName; /** The meeting/scheduling link the embed loads. */
|
|
473
|
+
url: string;
|
|
474
|
+
bannerText?: string;
|
|
475
|
+
bannerIcon?: string;
|
|
476
|
+
ctaInstanceId?: string;
|
|
477
|
+
};
|
|
478
|
+
/** Diagnose skill mode. */
|
|
479
|
+
declare const DiagnoseSubtype: {
|
|
480
|
+
/** A scored self-assessment rendered with results at the end. */readonly Standalone: "standalone"; /** Questions gather context for a follow-up skill (see `followUpSkill`). */
|
|
481
|
+
readonly ContextGathering: "context_gathering";
|
|
482
|
+
};
|
|
483
|
+
type DiagnoseSubtypeName = (typeof DiagnoseSubtype)[keyof typeof DiagnoseSubtype];
|
|
484
|
+
/** Answer option labels for diagnose questions. */
|
|
485
|
+
declare const DiagnoseOptionLabel: {
|
|
486
|
+
readonly A: "A";
|
|
487
|
+
readonly B: "B";
|
|
488
|
+
readonly C: "C";
|
|
489
|
+
readonly D: "D";
|
|
490
|
+
};
|
|
491
|
+
type DiagnoseOptionLabelName = (typeof DiagnoseOptionLabel)[keyof typeof DiagnoseOptionLabel];
|
|
492
|
+
/** Header for a diagnostic assessment — render as the assessment intro. */
|
|
493
|
+
interface DiagnosticHeader {
|
|
494
|
+
targetTopic: string;
|
|
495
|
+
subtitle: string;
|
|
496
|
+
/** Total number of questions the assessment will stream. */
|
|
497
|
+
questionCount: number;
|
|
498
|
+
subtype?: DiagnoseSubtypeName;
|
|
499
|
+
/** For context_gathering mode — the skill to invoke after the user submits answers. */
|
|
500
|
+
followUpSkill?: string;
|
|
501
|
+
/** For context_gathering mode — the prompt to send to `followUpSkill` afterwards. */
|
|
502
|
+
followUpPrompt?: string;
|
|
503
|
+
}
|
|
504
|
+
/**
|
|
505
|
+
* A self-assessment question (no correct answer). Render the options as a
|
|
506
|
+
* single-choice list; `score` supports a results chart in standalone mode.
|
|
507
|
+
*/
|
|
508
|
+
interface DiagnosticQuestion {
|
|
509
|
+
id: string;
|
|
510
|
+
/** Short category name, usable as a results-chart axis label. */
|
|
511
|
+
category: string;
|
|
512
|
+
questionText: string;
|
|
513
|
+
options: Array<{
|
|
514
|
+
label: DiagnoseOptionLabelName;
|
|
515
|
+
text: string;
|
|
516
|
+
score?: number;
|
|
517
|
+
}>;
|
|
518
|
+
prerequisiteConceptId: string | null;
|
|
519
|
+
prerequisiteConceptName: string | null;
|
|
520
|
+
}
|
|
521
|
+
/** A step title in a how-to outline (details stream later as {@link HowToStep}). */
|
|
522
|
+
interface HowToStepOutline {
|
|
523
|
+
id: string;
|
|
524
|
+
title: string;
|
|
525
|
+
}
|
|
526
|
+
/** How-to outline — render immediately as a skeleton; steps fill in after. */
|
|
527
|
+
interface HowToOutline {
|
|
528
|
+
title: string;
|
|
529
|
+
steps: HowToStepOutline[];
|
|
530
|
+
}
|
|
531
|
+
/** Content reference attached to a how-to step — render as a source card. */
|
|
532
|
+
interface HowToStepContent {
|
|
533
|
+
contentId: string;
|
|
534
|
+
title: string;
|
|
535
|
+
url: string | null;
|
|
536
|
+
contentType: ContentTypeName | null;
|
|
537
|
+
/** The matching excerpt that demonstrates relevance. */
|
|
538
|
+
excerpt: string;
|
|
539
|
+
thumbnailUrl?: string;
|
|
540
|
+
}
|
|
541
|
+
/** A fully detailed how-to step — replaces the outline entry with the same `id`. */
|
|
542
|
+
interface HowToStep {
|
|
543
|
+
id: string;
|
|
544
|
+
title: string;
|
|
545
|
+
description: string;
|
|
546
|
+
content: HowToStepContent | null;
|
|
547
|
+
/** Lucide icon name. */
|
|
548
|
+
icon?: string;
|
|
549
|
+
}
|
|
550
|
+
/** Header for a playlist — render as the playlist title/description. */
|
|
551
|
+
interface PlaylistHeader {
|
|
552
|
+
title: string;
|
|
553
|
+
description: string;
|
|
554
|
+
}
|
|
555
|
+
/** A single item in a curated playlist — render as a content card. */
|
|
556
|
+
interface PlaylistItem {
|
|
557
|
+
id: string;
|
|
558
|
+
title: string;
|
|
559
|
+
description: string | null;
|
|
560
|
+
body?: string | null;
|
|
561
|
+
contentType: ContentTypeName;
|
|
562
|
+
url: string | null;
|
|
563
|
+
thumbnailUrl?: string;
|
|
564
|
+
/** Why this item is included — streams in later via `skill_playlist_rationale`. */
|
|
565
|
+
rationale?: string;
|
|
566
|
+
}
|
|
567
|
+
/** Business case format sub-types. */
|
|
568
|
+
declare const BusinessCaseSubType: {
|
|
569
|
+
readonly RoiAnalysis: "roi-analysis";
|
|
570
|
+
readonly StakeholderBrief: "stakeholder-brief";
|
|
571
|
+
readonly VendorComparison: "vendor-comparison";
|
|
572
|
+
};
|
|
573
|
+
type BusinessCaseSubTypeName = (typeof BusinessCaseSubType)[keyof typeof BusinessCaseSubType];
|
|
574
|
+
/** Format option in the business case chooser — render as a selectable card. */
|
|
575
|
+
interface BusinessCaseFormatOption {
|
|
576
|
+
subType: BusinessCaseSubTypeName;
|
|
577
|
+
label: string;
|
|
578
|
+
description: string;
|
|
579
|
+
/** Lucide icon name. */
|
|
580
|
+
icon: string;
|
|
581
|
+
}
|
|
582
|
+
/** Reference to a pre-generated business case draft, keyed by sub-type. */
|
|
583
|
+
interface BusinessCaseDraftRef {
|
|
584
|
+
draftId: string;
|
|
585
|
+
skillInstanceId: string;
|
|
586
|
+
}
|
|
587
|
+
/** Node types in a solution design diagram. */
|
|
588
|
+
declare const SolutionDesignNodeType: {
|
|
589
|
+
readonly Process: "process";
|
|
590
|
+
readonly Decision: "decision";
|
|
591
|
+
readonly Datastore: "datastore";
|
|
592
|
+
readonly External: "external";
|
|
593
|
+
readonly Trigger: "trigger";
|
|
594
|
+
readonly Start: "start";
|
|
595
|
+
readonly End: "end";
|
|
596
|
+
};
|
|
597
|
+
type SolutionDesignNodeTypeName = (typeof SolutionDesignNodeType)[keyof typeof SolutionDesignNodeType];
|
|
598
|
+
/** A node in a solution design diagram — render as a flowchart node. */
|
|
599
|
+
interface SolutionDesignNode {
|
|
600
|
+
id: string;
|
|
601
|
+
label: string;
|
|
602
|
+
description: string;
|
|
603
|
+
nodeType: SolutionDesignNodeTypeName;
|
|
604
|
+
/** Lucide icon name. */
|
|
605
|
+
icon: string;
|
|
606
|
+
}
|
|
607
|
+
/** A directed edge between two solution design nodes (by node `id`). */
|
|
608
|
+
interface SolutionDesignEdge {
|
|
609
|
+
id: string;
|
|
610
|
+
source: string;
|
|
611
|
+
target: string;
|
|
612
|
+
label?: string;
|
|
613
|
+
}
|
|
614
|
+
/** Header for a solution design — render as the diagram title/summary. */
|
|
615
|
+
interface SolutionDesignHeader {
|
|
616
|
+
title: string;
|
|
617
|
+
summary: string;
|
|
618
|
+
}
|
|
619
|
+
/** Suggested retry attached to a recoverable skill error. */
|
|
620
|
+
interface SkillErrorRetryHint {
|
|
621
|
+
/** Re-ask with this prompt… */
|
|
622
|
+
prompt: string;
|
|
623
|
+
/** …optionally forcing this skill. */
|
|
624
|
+
forcedSkill?: SkillResponseTypeType;
|
|
625
|
+
}
|
|
626
|
+
/**
|
|
627
|
+
* A structured skill event, discriminated on `name`. Every turn runs one skill
|
|
628
|
+
* (plain answers are the `answer` skill): `skill_start` announces which,
|
|
629
|
+
* payload events stream the deliverable, and `skill_end` closes it. Use
|
|
630
|
+
* {@link reduceSkillEvent} to fold these into renderable state instead of
|
|
631
|
+
* handling each variant by hand.
|
|
632
|
+
*/
|
|
633
|
+
type GuideSkillEvent = {
|
|
634
|
+
type: "skill";
|
|
635
|
+
name: typeof GuideEvent.SkillStart; /** Which skill this turn runs, and the assistant message it belongs to. */
|
|
636
|
+
value: {
|
|
637
|
+
skill: SkillResponseTypeType;
|
|
638
|
+
messageId: string;
|
|
639
|
+
diagnoseSubtype?: DiagnoseSubtypeName;
|
|
640
|
+
followUpSkill?: string;
|
|
641
|
+
};
|
|
642
|
+
} | {
|
|
643
|
+
type: "skill";
|
|
644
|
+
name: typeof GuideEvent.SkillContent; /** Markdown token chunk of the skill's long-form body (business case drafts, etc.). */
|
|
645
|
+
value: {
|
|
646
|
+
delta: string;
|
|
647
|
+
};
|
|
648
|
+
} | {
|
|
649
|
+
type: "skill";
|
|
650
|
+
name: typeof GuideEvent.SkillDocuments; /** Source documents behind the reply — render as citation/source cards. */
|
|
651
|
+
value: {
|
|
652
|
+
documents: GuideDocument[];
|
|
653
|
+
};
|
|
654
|
+
} | {
|
|
655
|
+
type: "skill";
|
|
656
|
+
name: typeof GuideEvent.SkillRecommendations;
|
|
657
|
+
/**
|
|
658
|
+
* Either the recommend skill's content cards ({@link ContentRecommendation},
|
|
659
|
+
* has `targetSkill`) or post-answer follow-up pills ({@link SkillRecommendation},
|
|
660
|
+
* has `skill`). Discriminate by which of those keys is present.
|
|
661
|
+
*/
|
|
662
|
+
value: {
|
|
663
|
+
recommendations: ContentRecommendation[] | SkillRecommendation[];
|
|
664
|
+
};
|
|
665
|
+
} | {
|
|
666
|
+
type: "skill";
|
|
667
|
+
name: typeof GuideEvent.SkillCTAs; /** Calls-to-action for this turn — render the first below the response. */
|
|
668
|
+
value: {
|
|
669
|
+
ctas: SkillCTA[];
|
|
670
|
+
};
|
|
671
|
+
} | {
|
|
672
|
+
type: "skill";
|
|
673
|
+
name: typeof GuideEvent.SkillDiagnoseHeader;
|
|
674
|
+
value: {
|
|
675
|
+
header: DiagnosticHeader;
|
|
676
|
+
};
|
|
677
|
+
} | {
|
|
678
|
+
type: "skill";
|
|
679
|
+
name: typeof GuideEvent.SkillDiagnoseQuestion;
|
|
680
|
+
value: {
|
|
681
|
+
question: DiagnosticQuestion;
|
|
682
|
+
};
|
|
683
|
+
} | {
|
|
684
|
+
type: "skill";
|
|
685
|
+
name: typeof GuideEvent.SkillPlaylistItems;
|
|
686
|
+
value: {
|
|
687
|
+
items: PlaylistItem[];
|
|
688
|
+
};
|
|
689
|
+
} | {
|
|
690
|
+
type: "skill";
|
|
691
|
+
name: typeof GuideEvent.SkillPlaylistHeader;
|
|
692
|
+
value: {
|
|
693
|
+
header: PlaylistHeader;
|
|
694
|
+
};
|
|
695
|
+
} | {
|
|
696
|
+
type: "skill";
|
|
697
|
+
name: typeof GuideEvent.SkillPlaylistRationale; /** Late-streamed rationale for the playlist item with this `itemId`. */
|
|
698
|
+
value: {
|
|
699
|
+
itemId: string;
|
|
700
|
+
rationale: string;
|
|
701
|
+
};
|
|
702
|
+
} | {
|
|
703
|
+
type: "skill";
|
|
704
|
+
name: typeof GuideEvent.SkillHowToOutline; /** Render the outline immediately; detailed steps stream in `skill_howto_steps`. */
|
|
705
|
+
value: {
|
|
706
|
+
outline: HowToOutline;
|
|
707
|
+
skillInstanceId?: string;
|
|
708
|
+
};
|
|
709
|
+
} | {
|
|
710
|
+
type: "skill";
|
|
711
|
+
name: typeof GuideEvent.SkillHowToSteps;
|
|
712
|
+
value: {
|
|
713
|
+
steps: HowToStep[];
|
|
714
|
+
};
|
|
715
|
+
} | {
|
|
716
|
+
type: "skill";
|
|
717
|
+
name: typeof GuideEvent.SkillBusinessCaseChooser; /** Format options to choose from; `drafts` maps subType → pre-generated draft. */
|
|
718
|
+
value: {
|
|
719
|
+
formats: BusinessCaseFormatOption[];
|
|
720
|
+
drafts: Record<string, BusinessCaseDraftRef>;
|
|
721
|
+
};
|
|
722
|
+
} | {
|
|
723
|
+
type: "skill";
|
|
724
|
+
name: typeof GuideEvent.SkillBusinessCaseDelta; /** Markdown chunk of the draft for one business case format. */
|
|
725
|
+
value: {
|
|
726
|
+
subType: BusinessCaseSubTypeName;
|
|
727
|
+
delta: string;
|
|
728
|
+
};
|
|
729
|
+
} | {
|
|
730
|
+
type: "skill";
|
|
731
|
+
name: typeof GuideEvent.SkillSolutionDesignHeader;
|
|
732
|
+
value: {
|
|
733
|
+
header: SolutionDesignHeader;
|
|
734
|
+
};
|
|
735
|
+
} | {
|
|
736
|
+
type: "skill";
|
|
737
|
+
name: typeof GuideEvent.SkillSolutionDesignDiagram; /** Flowchart nodes + edges — render with any diagram/graph component. */
|
|
738
|
+
value: {
|
|
739
|
+
nodes: SolutionDesignNode[];
|
|
740
|
+
edges: SolutionDesignEdge[];
|
|
741
|
+
};
|
|
742
|
+
} | {
|
|
743
|
+
type: "skill";
|
|
744
|
+
name: typeof GuideEvent.SkillEnd; /** `skillInstanceId` is the persisted deliverable's id (for `skills.get`/`update`). */
|
|
745
|
+
value: {
|
|
746
|
+
skillInstanceId?: string;
|
|
747
|
+
skillResponseId?: string;
|
|
748
|
+
};
|
|
749
|
+
};
|
|
285
750
|
/**
|
|
286
|
-
* A single event yielded by {@link GuideClient.ask}.
|
|
287
|
-
*
|
|
288
|
-
*
|
|
751
|
+
* A single event yielded by {@link GuideClient.ask}.
|
|
752
|
+
*
|
|
753
|
+
* - `text` streams the chat reply; `skill` carries the structured deliverable
|
|
754
|
+
* (see {@link GuideSkillEvent}).
|
|
755
|
+
* - `gate` means the guide wants an email before continuing — collect one,
|
|
756
|
+
* call `submitGate(email)`, then re-send the message.
|
|
757
|
+
* - `skill-unknown` is a forward-compatibility escape hatch: a structured
|
|
758
|
+
* event this SDK version doesn't know. Safe to ignore.
|
|
289
759
|
*/
|
|
290
760
|
type GuideStreamEvent = {
|
|
291
761
|
type: "run-started";
|
|
@@ -301,9 +771,9 @@ type GuideStreamEvent = {
|
|
|
301
771
|
} | {
|
|
302
772
|
type: "message-end";
|
|
303
773
|
messageId: string;
|
|
304
|
-
} | {
|
|
305
|
-
type: "skill";
|
|
306
|
-
name:
|
|
774
|
+
} | GuideSkillEvent | {
|
|
775
|
+
type: "skill-unknown";
|
|
776
|
+
name: string;
|
|
307
777
|
value: Record<string, unknown>;
|
|
308
778
|
} | {
|
|
309
779
|
type: "gate";
|
|
@@ -314,6 +784,8 @@ type GuideStreamEvent = {
|
|
|
314
784
|
type: "error";
|
|
315
785
|
message: string;
|
|
316
786
|
code?: string;
|
|
787
|
+
retryable?: boolean;
|
|
788
|
+
retryHint?: SkillErrorRetryHint;
|
|
317
789
|
} | {
|
|
318
790
|
type: "run-finished";
|
|
319
791
|
finishReason?: string;
|
|
@@ -337,6 +809,11 @@ interface SkillsApi {
|
|
|
337
809
|
markShared(skillInstanceId: string): Promise<MarkSharedResult>;
|
|
338
810
|
importShared(sourceSkillInstanceId: string): Promise<ImportSharedResult>;
|
|
339
811
|
}
|
|
812
|
+
/**
|
|
813
|
+
* Normalize `baseUrl` to the bare host the server stores: lowercased, no port,
|
|
814
|
+
* no leading `www.` (the domain write-path strips it, so a `www.` host can
|
|
815
|
+
* never match). Accepts a bare host too, in case `baseUrl` omits the protocol.
|
|
816
|
+
*/
|
|
340
817
|
/**
|
|
341
818
|
* The client returned by {@link initGuide}. Holds the resolved guide, the
|
|
342
819
|
* credentialed live API client, and the in-memory conversation history. Every
|
|
@@ -391,5 +868,72 @@ declare class GuideClient {
|
|
|
391
868
|
/** Bootstrap a guide session and return a ready-to-use {@link GuideClient}. */
|
|
392
869
|
declare function initGuide(config: InitGuideConfig): Promise<GuideClient>;
|
|
393
870
|
//#endregion
|
|
394
|
-
|
|
871
|
+
//#region src/skill-state.d.ts
|
|
872
|
+
/**
|
|
873
|
+
* Renderable state for one skill turn, folded from the `skill` events of a
|
|
874
|
+
* single {@link GuideClient.ask} stream. Which fields fill in depends on
|
|
875
|
+
* `skill`; everything else stays at its empty default:
|
|
876
|
+
*
|
|
877
|
+
* - `answer`: `documents`, `followUpRecommendations`, `ctas`
|
|
878
|
+
* - `recommend`: `contentRecommendations`, `ctas`
|
|
879
|
+
* - `diagnose`: `diagnoseHeader`, `diagnoseQuestions`
|
|
880
|
+
* - `playlist`: `playlistHeader`, `playlistItems`
|
|
881
|
+
* - `howto`: `howToOutline` (render first), then `howToSteps`
|
|
882
|
+
* - `businesscase`: `businessCaseFormats`/`businessCaseDrafts` (chooser), then
|
|
883
|
+
* `businessCaseContent[subType]` markdown as a format streams
|
|
884
|
+
* - `solutiondesign`: `solutionDesignHeader`, `solutionDesignNodes`/`Edges`
|
|
885
|
+
*/
|
|
886
|
+
interface GuideSkillTurn {
|
|
887
|
+
/** Which skill this turn ran. Null until `skill_start` arrives. */
|
|
888
|
+
skill: SkillResponseTypeType | null;
|
|
889
|
+
/** `streaming` until `skill_end`. */
|
|
890
|
+
status: "streaming" | "complete";
|
|
891
|
+
/** The assistant message this skill output belongs to. */
|
|
892
|
+
messageId: string | null;
|
|
893
|
+
/** Diagnose mode — `context_gathering` runs `followUpSkill` after answers are submitted. */
|
|
894
|
+
diagnoseSubtype: DiagnoseSubtypeName | null;
|
|
895
|
+
followUpSkill: string | null;
|
|
896
|
+
/** Accumulated long-form markdown body (`skill_content` deltas). */
|
|
897
|
+
content: string;
|
|
898
|
+
/** Source documents behind the reply — render as citation/source cards. */
|
|
899
|
+
documents: GuideDocument[];
|
|
900
|
+
/** The recommend skill's content cards. */
|
|
901
|
+
contentRecommendations: ContentRecommendation[];
|
|
902
|
+
/** Post-answer follow-up pills — `ask(prompt, { forcedSkill: skill })` on click. */
|
|
903
|
+
followUpRecommendations: SkillRecommendation[];
|
|
904
|
+
/** Calls-to-action — render the first below the response. */
|
|
905
|
+
ctas: SkillCTA[];
|
|
906
|
+
diagnoseHeader: DiagnosticHeader | null;
|
|
907
|
+
diagnoseQuestions: DiagnosticQuestion[];
|
|
908
|
+
playlistHeader: PlaylistHeader | null;
|
|
909
|
+
playlistItems: PlaylistItem[];
|
|
910
|
+
howToOutline: HowToOutline | null;
|
|
911
|
+
howToSteps: HowToStep[];
|
|
912
|
+
businessCaseFormats: BusinessCaseFormatOption[];
|
|
913
|
+
businessCaseDrafts: Record<string, BusinessCaseDraftRef>;
|
|
914
|
+
/** Accumulated draft markdown per business case subType. */
|
|
915
|
+
businessCaseContent: Record<string, string>;
|
|
916
|
+
solutionDesignHeader: SolutionDesignHeader | null;
|
|
917
|
+
solutionDesignNodes: SolutionDesignNode[];
|
|
918
|
+
solutionDesignEdges: SolutionDesignEdge[];
|
|
919
|
+
/** Persisted deliverable id (for `client.skills.get`/`update`), set on `skill_end`. */
|
|
920
|
+
skillInstanceId: string | null;
|
|
921
|
+
}
|
|
922
|
+
/** A fresh, empty turn state. */
|
|
923
|
+
declare function createSkillTurn(): GuideSkillTurn;
|
|
924
|
+
/**
|
|
925
|
+
* Fold one `skill` stream event into the turn state. Pure and immutable — the
|
|
926
|
+
* returned object is a new reference whenever anything changed, so the result
|
|
927
|
+
* can back React state directly:
|
|
928
|
+
*
|
|
929
|
+
* ```ts
|
|
930
|
+
* let turn = createSkillTurn();
|
|
931
|
+
* for await (const event of client.ask(message)) {
|
|
932
|
+
* if (event.type === "skill") turn = reduceSkillEvent(turn, event);
|
|
933
|
+
* }
|
|
934
|
+
* ```
|
|
935
|
+
*/
|
|
936
|
+
declare function reduceSkillEvent(turn: GuideSkillTurn, event: GuideSkillEvent): GuideSkillTurn;
|
|
937
|
+
//#endregion
|
|
938
|
+
export { AskOptions, BrandKitTheme, BusinessCaseDraftRef, BusinessCaseFormatOption, BusinessCaseSubType, BusinessCaseSubTypeName, ChatMessage, Confidence, ConfidenceName, ConsentFlags, ConsentLevels, ConsentTier, ConsentTierName, ContentRecommendation, ContentType, ContentTypeName, Conversation, ConversationMessage, ConversationWithMessages, CtaPlacement, CtaPlacementName, DiagnoseOptionLabel, DiagnoseOptionLabelName, DiagnoseSubtype, DiagnoseSubtypeName, DiagnosticHeader, DiagnosticQuestion, EmbedTrackingEvent, EmbedTrackingEventName, GuideClient, GuideCustomization, GuideDocument, GuideEvent, GuideEventName, GuideGraphSnapshot, GuideSkillEvent, type GuideSkillTurn, GuideStreamEvent, HowToOutline, HowToStep, HowToStepContent, HowToStepOutline, ImportSharedResult, InitGuideConfig, MarkSharedResult, PlaylistHeader, PlaylistItem, ResolvedGuide, SSEMessageType, SSEMessageTypeName, SchedulerProvider, SchedulerProviderName, SelectDraftResult, SkillCTA, SkillCtaKind, SkillCtaKindName, SkillErrorRetryHint, SkillHistoryGroup, SkillHistoryInstance, SkillIconColorMode, SkillIconColorModeType, SkillIconStyle, SkillInstance, SkillRecommendation, SkillResponseType, SkillResponseTypeType, SolutionDesignEdge, SolutionDesignHeader, SolutionDesignNode, SolutionDesignNodeType, SolutionDesignNodeTypeName, SubmitGateOptions, SubmitGateResult, TrackEventType, UpdateSkillInstanceResult, VisitorStatus, createSkillTurn, initGuide, reduceSkillEvent };
|
|
395
939
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/types.ts","../src/GuideClient.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/types.ts","../src/GuideClient.ts","../src/skill-state.ts"],"mappings":";;cAUa,cAAA;EAAA;;;;;;;;KASD,kBAAA,WAA6B,cAAA,eAA6B,cAAA;;;;AAAtE;;cAOa,UAAA;EAAA;;;;;;;;;;;;;;;;;;;;KAqBD,cAAA,WAAyB,UAAA,eAAyB,UAAA;;cAGjD,iBAAA;EAAA;;;;;;;;KASD,qBAAA,WAAgC,iBAAA,eAAgC,iBAAA;AAT5E;AAAA,cAYa,WAAA;EAAA;;;;KAKD,eAAA,WAA0B,WAAA,eAA0B,WAAA;;cAGnD,kBAAA;EAAA;;;;;;KAOD,sBAAA,WAAiC,kBAAA,eAAiC,kBAAA;;;AAf9E;;;KAsBY,cAAA;;UAGK,aA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