@vellumai/assistant 0.10.10-dev.202607201748.b18908c → 0.10.10-dev.202607201810.d417cba
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
|
@@ -14,9 +14,14 @@ import {
|
|
|
14
14
|
function makeConfig(
|
|
15
15
|
memoryEnabled: boolean,
|
|
16
16
|
v2Enabled: boolean,
|
|
17
|
+
v3Live = false,
|
|
17
18
|
): AssistantConfig {
|
|
18
19
|
return {
|
|
19
|
-
memory: {
|
|
20
|
+
memory: {
|
|
21
|
+
enabled: memoryEnabled,
|
|
22
|
+
v2: { enabled: v2Enabled },
|
|
23
|
+
v3: { live: v3Live },
|
|
24
|
+
},
|
|
20
25
|
} as AssistantConfig;
|
|
21
26
|
}
|
|
22
27
|
|
|
@@ -40,6 +45,7 @@ describe("config-setting-snapshot", () => {
|
|
|
40
45
|
expect(recordedPairs().sort()).toEqual([
|
|
41
46
|
["memory.enabled", "true"],
|
|
42
47
|
["memory.v2.enabled", "false"],
|
|
48
|
+
["memory.v3.live", "false"],
|
|
43
49
|
]);
|
|
44
50
|
});
|
|
45
51
|
|
|
@@ -48,7 +54,7 @@ describe("config-setting-snapshot", () => {
|
|
|
48
54
|
recordConfigSettingSnapshot(makeConfig(true, true));
|
|
49
55
|
recordConfigSettingSnapshot(makeConfig(true, true));
|
|
50
56
|
|
|
51
|
-
expect(recordedPairs()).toHaveLength(
|
|
57
|
+
expect(recordedPairs()).toHaveLength(3);
|
|
52
58
|
});
|
|
53
59
|
|
|
54
60
|
test("a changed value records only the changed key", () => {
|
|
@@ -60,6 +66,16 @@ describe("config-setting-snapshot", () => {
|
|
|
60
66
|
expect(recordedPairs()).toEqual([["memory.v2.enabled", "false"]]);
|
|
61
67
|
});
|
|
62
68
|
|
|
69
|
+
test("memory.v3.live is tracked and its flip is captured", () => {
|
|
70
|
+
recordConfigSettingSnapshot(makeConfig(true, true, false));
|
|
71
|
+
expect(recordedPairs()).toContainEqual(["memory.v3.live", "false"]);
|
|
72
|
+
resetOutboxTable();
|
|
73
|
+
|
|
74
|
+
recordConfigSettingSnapshot(makeConfig(true, true, true));
|
|
75
|
+
|
|
76
|
+
expect(recordedPairs()).toEqual([["memory.v3.live", "true"]]);
|
|
77
|
+
});
|
|
78
|
+
|
|
63
79
|
test("unknown consent skips entirely — no rows, no memo", () => {
|
|
64
80
|
setShareAnalytics("unknown");
|
|
65
81
|
recordConfigSettingSnapshot(makeConfig(true, false));
|
|
@@ -75,6 +91,7 @@ describe("config-setting-snapshot", () => {
|
|
|
75
91
|
expect(recordedPairs().sort()).toEqual([
|
|
76
92
|
["memory.enabled", "true"],
|
|
77
93
|
["memory.v2.enabled", "false"],
|
|
94
|
+
["memory.v3.live", "false"],
|
|
78
95
|
]);
|
|
79
96
|
});
|
|
80
97
|
|
|
@@ -88,13 +105,13 @@ describe("config-setting-snapshot", () => {
|
|
|
88
105
|
// once consent resolves).
|
|
89
106
|
setShareAnalytics(true);
|
|
90
107
|
recordConfigSettingSnapshot(makeConfig(true, true));
|
|
91
|
-
expect(recordedPairs()).toHaveLength(
|
|
108
|
+
expect(recordedPairs()).toHaveLength(3);
|
|
92
109
|
});
|
|
93
110
|
|
|
94
111
|
test("re-opt-in after an opt-out re-records the full snapshot", () => {
|
|
95
112
|
// Recorded while opted in.
|
|
96
113
|
recordConfigSettingSnapshot(makeConfig(true, true));
|
|
97
|
-
expect(recordedPairs()).toHaveLength(
|
|
114
|
+
expect(recordedPairs()).toHaveLength(3);
|
|
98
115
|
resetOutboxTable();
|
|
99
116
|
|
|
100
117
|
// Opt out: the reporter's opt-out flush discards any pending rows, so the
|
|
@@ -110,6 +127,7 @@ describe("config-setting-snapshot", () => {
|
|
|
110
127
|
expect(recordedPairs().sort()).toEqual([
|
|
111
128
|
["memory.enabled", "true"],
|
|
112
129
|
["memory.v2.enabled", "true"],
|
|
130
|
+
["memory.v3.live", "false"],
|
|
113
131
|
]);
|
|
114
132
|
});
|
|
115
133
|
|
|
@@ -32,6 +32,7 @@ function trackedConfigSettings(
|
|
|
32
32
|
const pairs: ReadonlyArray<readonly [string, boolean | undefined]> = [
|
|
33
33
|
["memory.enabled", config.memory?.enabled],
|
|
34
34
|
["memory.v2.enabled", config.memory?.v2?.enabled],
|
|
35
|
+
["memory.v3.live", config.memory?.v3?.live],
|
|
35
36
|
];
|
|
36
37
|
return pairs
|
|
37
38
|
.filter((pair): pair is readonly [string, boolean] => pair[1] != null)
|