@umbraco-ai/core 1.10.0 → 1.10.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umbraco-ai/core",
3
- "version": "1.10.0",
3
+ "version": "1.10.1",
4
4
  "type": "module",
5
5
  "types": "./types/umbraco-ai-public-types.d.ts",
6
6
  "files": [
@@ -557,7 +557,10 @@ export declare class UaiDocumentAdapter implements UaiEntityAdapterApi {
557
557
  getName(workspaceContext: unknown): string;
558
558
  /**
559
559
  * Get an observable for the document name for reactive updates.
560
- * Uses the variants observable which properly tracks name changes.
560
+ * Uses the variants observable which properly tracks name changes, and
561
+ * picks the variant whose culture matches what the editor currently has
562
+ * focused so the AI context selector shows the right name on multi-
563
+ * variant documents.
561
564
  */
562
565
  getNameObservable(workspaceContext: unknown): Observable<string | undefined> | undefined;
563
566
  /**
@@ -573,7 +576,12 @@ export declare class UaiDocumentAdapter implements UaiEntityAdapterApi {
573
576
  /**
574
577
  * Serialize document for LLM context.
575
578
  * Uses structure to get all properties, then merges with values.
576
- * Only includes TextBox and TextArea properties for now.
579
+ *
580
+ * Multi-variant content: `getValues()` returns one entry per
581
+ * (alias, culture, segment). We pick the entry that matches the variant
582
+ * the editor currently has focused, falling back to the invariant entry
583
+ * for properties that don't vary, so prompt template variables like
584
+ * `{{header}}` resolve to the active culture's value.
577
585
  */
578
586
  serializeForLlm(workspaceContext: unknown): Promise<UaiSerializedEntity>;
579
587
  /**
@@ -1166,6 +1174,14 @@ export declare interface UaiSerializedEntity {
1166
1174
  name: string;
1167
1175
  /** Parent unique when creating a new entity. Undefined for existing entities. */
1168
1176
  parentUnique?: string | null;
1177
+ /**
1178
+ * Active culture the editor was on when the entity was serialized.
1179
+ * Null/undefined for invariant entities. Used by the server to pick the
1180
+ * matching property entry from `data.properties` on multi-variant content.
1181
+ */
1182
+ culture?: string | null;
1183
+ /** Active segment when the entity was serialized. */
1184
+ segment?: string | null;
1169
1185
  /**
1170
1186
  * Free-form entity data as JSON object.
1171
1187
  * Adapters decide the structure based on entity type.
@@ -1175,7 +1191,7 @@ export declare interface UaiSerializedEntity {
1175
1191
  * {
1176
1192
  * contentType: "blogPost",
1177
1193
  * properties: [
1178
- * { alias: "title", label: "Title", editorAlias: "Umbraco.TextBox", value: "Hello" }
1194
+ * { alias: "title", label: "Title", editorAlias: "Umbraco.TextBox", value: "Hello", culture: "en-US", segment: null }
1179
1195
  * ]
1180
1196
  * }
1181
1197
  * ```
@@ -1194,15 +1210,18 @@ export declare interface UaiSerializedEntity {
1194
1210
 
1195
1211
  /**
1196
1212
  * Serialized property for LLM context.
1197
- * @deprecated Entity data is now stored in UaiSerializedEntity.data as free-form JSON.
1198
- * For CMS entities, properties are nested inside the data field.
1199
- * This interface is kept for reference only.
1213
+ * Used as the element type of `UaiSerializedEntity.data.properties` for CMS entities.
1214
+ *
1215
+ * `culture` and `segment` describe which variant this property value belongs to:
1216
+ * `null` means invariant (no culture/segment dimension on the property).
1200
1217
  */
1201
1218
  export declare interface UaiSerializedProperty {
1202
1219
  alias: string;
1203
1220
  label: string;
1204
1221
  editorAlias: string;
1205
1222
  value: unknown;
1223
+ culture: string | null;
1224
+ segment: string | null;
1206
1225
  }
1207
1226
 
1208
1227
  /**