@aastrika/ai-elements 0.6.0 → 0.6.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/CHANGELOG.md CHANGED
@@ -6,6 +6,26 @@ see at a glance what to expect when they upgrade.
6
6
  Versions follow semver: a **minor** adds something, a **patch** fixes something,
7
7
  and neither removes anything a host was using.
8
8
 
9
+ ## 0.6.1
10
+
11
+ **Fixed**
12
+ - The usage report showed one person's figures instead of the whole
13
+ organisation's — and nothing at all when the signed-in name did not match the
14
+ name recorded on their content. Every request body was given the signed-in
15
+ `creator`, including the report, where that field means "filter to this
16
+ person" rather than "this is who I am". The report is no longer given one; the
17
+ dashboard's own picker still filters as before
18
+
19
+ **Added**
20
+ - `creatorName` in `configure()` — the signed-in person's display name, shown in
21
+ the report while `creator` stays what it groups by. A host can now use a
22
+ stable handle as `creator` and let people rename themselves without splitting
23
+ their history across two creators. Optional: omit it and the report shows
24
+ `creator`, exactly as today
25
+
26
+ Needs the service to be on a build that stores `creator_name`; on an older one
27
+ the field is ignored and nothing changes.
28
+
9
29
  ## 0.6.0
10
30
 
11
31
  Adds behaviour rather than API: the tags, attributes and events are exactly
@@ -43,8 +43,20 @@ export interface AastrikaConfig {
43
43
  apiBase: string;
44
44
  /** Headers proving the caller may use the service. Called before every request. */
45
45
  getAuthHeaders?: () => Record<string, string> | Promise<Record<string, string>>;
46
- /** The username signed into YOUR application. Attribution, never verified. */
46
+ /**
47
+ * A STABLE key for whoever is signed into YOUR application — a login handle
48
+ * or an id, never a display name. The usage report groups and filters by it,
49
+ * so renaming somebody must not change it. Attribution, never verified.
50
+ */
47
51
  creator?: () => string | null;
52
+ /**
53
+ * The same person's display name, e.g. "Prince Gupta". Shown in the usage
54
+ * report; `creator` remains what it groups by, so people can rename
55
+ * themselves without splitting their history. Optional — omit it and the
56
+ * report shows `creator`, so send one whenever `creator` is an opaque id,
57
+ * or the report fills with UUIDs.
58
+ */
59
+ creatorName?: () => string | null;
48
60
  /** Called whenever a request fails, so your monitoring hears about it. */
49
61
  onError?: (error: AastrikaError) => void;
50
62
  }