@asteby/metacore-runtime-react 37.6.0 → 38.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.
@@ -31,6 +31,23 @@ export interface FormSection {
31
31
  * Tolerates the camelCase alias, same as fields. */
32
32
  visible_when?: VisibleWhen
33
33
  visibleWhen?: VisibleWhen
34
+ /** AI-assisted step (kernel v0.141.0): the SDK renders an interview panel
35
+ * driven by the host's assist provider inside this section. */
36
+ assist?: FormAssist
37
+ }
38
+
39
+ /** Declaration of an AI-assisted step (`form_layout.sections[].assist`). */
40
+ export interface FormAssist {
41
+ /** Host-registered provider key, e.g. `brand.website_dna`. */
42
+ provider: string
43
+ label?: string
44
+ description?: string
45
+ /** Form fields sent to the provider when the session starts. */
46
+ input?: string[]
47
+ /** Form fields the provider may fill when it finishes. */
48
+ output?: string[]
49
+ /** `button` (default) or `auto` (start as soon as every input has a value). */
50
+ trigger?: 'button' | 'auto'
34
51
  }
35
52
 
36
53
  /** Model-level layout directive. `mode` defaults to `"sections"`. */
@@ -50,6 +67,8 @@ export interface FieldGroup<F> {
50
67
  /** True for the synthetic group holding section-less / unknown-section fields. */
51
68
  isDefault: boolean
52
69
  fields: F[]
70
+ /** AI-assisted step declaration, when the section has one. */
71
+ assist?: FormAssist
53
72
  }
54
73
 
55
74
  /** The synthetic key of the orphan group (fields with no / unknown `section`). */
@@ -141,6 +160,7 @@ export function groupFieldsBySection<F extends { section?: string }>(
141
160
  collapsed: s.collapsed,
142
161
  isDefault: false,
143
162
  fields: secFields,
163
+ assist: s.assist,
144
164
  })
145
165
  }
146
166
  return groups
package/src/index.ts CHANGED
@@ -475,3 +475,5 @@ export {
475
475
  type AccentClasses,
476
476
  type WidgetFormatCtx,
477
477
  } from './widgets/widget-format'
478
+ export { AssistInterview, AssistCardView } from './assist-interview'
479
+ export type { AssistSession, AssistTurn, AssistQuestion, AssistCard, AssistProgressStep } from './assist-interview'