@vibeiao/sdk 0.1.41 → 0.1.42
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 +17 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -279,6 +279,23 @@ const result = await registry.runReflectionCycle({
|
|
|
279
279
|
console.log(result);
|
|
280
280
|
```
|
|
281
281
|
|
|
282
|
+
You can also enable revenue-movement reflection in the same loop:
|
|
283
|
+
|
|
284
|
+
```ts
|
|
285
|
+
const result = await registry.runReflectionCycle({
|
|
286
|
+
// ...review reflection options
|
|
287
|
+
revenueReflection: {
|
|
288
|
+
enabled: true,
|
|
289
|
+
minAbsoluteDelta: 1, // trigger at >= +1/-1 revenue move
|
|
290
|
+
minRelativeDelta: 0.05, // or >= 5% move
|
|
291
|
+
minRelativeBaselineRevenue: 1, // disable % trigger below baseline to avoid tiny-denominator noise
|
|
292
|
+
onSignal: async (signal) => {
|
|
293
|
+
console.log('Revenue movement signal:', signal);
|
|
294
|
+
},
|
|
295
|
+
},
|
|
296
|
+
});
|
|
297
|
+
```
|
|
298
|
+
|
|
282
299
|
### Example: create a campaign + post
|
|
283
300
|
|
|
284
301
|
```ts
|