@clipwright/core 0.44.0 → 0.46.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.
Files changed (46) hide show
  1. package/dist/ad-pause-trim.d.ts +6 -0
  2. package/dist/ad-pause-trim.js +6 -0
  3. package/dist/ad-pause-trim.js.map +1 -1
  4. package/dist/contract-dispositions.d.ts +156 -0
  5. package/dist/contracts/v1/workflow-brief.d.ts +496 -0
  6. package/dist/contracts/v1/workflow-catalog.d.ts +496 -0
  7. package/dist/contracts/v1/workflow-client.d.ts +248 -0
  8. package/dist/contracts/v1/workflow-execution.d.ts +15 -0
  9. package/dist/contracts/v1/workflow-next.d.ts +6 -0
  10. package/dist/contracts/v1/workflow-plan.d.ts +744 -0
  11. package/dist/contracts/v1/workflow-run-read.d.ts +2 -0
  12. package/dist/explainer-fit.d.ts +18 -0
  13. package/dist/explainer-fit.js +51 -0
  14. package/dist/explainer-fit.js.map +1 -0
  15. package/dist/faceless-media-record.d.ts +16 -0
  16. package/dist/faceless-price.d.ts +10 -0
  17. package/dist/faceless-price.js +10 -2
  18. package/dist/faceless-price.js.map +1 -1
  19. package/dist/faceless-public.d.ts +213 -0
  20. package/dist/faceless-public.js +40 -1
  21. package/dist/faceless-public.js.map +1 -1
  22. package/dist/index.d.ts +1 -0
  23. package/dist/index.js +1 -0
  24. package/dist/index.js.map +1 -1
  25. package/dist/prices.js +10 -3
  26. package/dist/prices.js.map +1 -1
  27. package/dist/run-static-warnings.js +7 -2
  28. package/dist/run-static-warnings.js.map +1 -1
  29. package/dist/runs.d.ts +2 -0
  30. package/dist/skills.d.ts +624 -0
  31. package/dist/templates/sounds.d.ts +203 -8
  32. package/dist/templates/sounds.js +8 -7
  33. package/dist/templates/sounds.js.map +1 -1
  34. package/dist/trend-search.d.ts +81 -6
  35. package/dist/trend-search.js +127 -11
  36. package/dist/trend-search.js.map +1 -1
  37. package/dist/voice-admission.d.ts +248 -0
  38. package/dist/workflows/methods/faceless-explainer.d.ts +26 -18
  39. package/dist/workflows/methods/kinetic-launch.d.ts +26 -18
  40. package/dist/workflows/methods/product-image-story.d.ts +26 -18
  41. package/dist/workflows/methods/reference-remake.d.ts +26 -18
  42. package/dist/workflows/methods/shared.d.ts +26 -18
  43. package/dist/workflows/methods/ugc-faq-answer.d.ts +26 -18
  44. package/dist/workflows/methods/ugc-product-intro.d.ts +26 -18
  45. package/dist/workflows/methods/website-proof-demo.d.ts +26 -18
  46. package/package.json +1 -1
@@ -3,7 +3,7 @@ import { z } from "zod";
3
3
  export const TEMPLATE_SOUND_BEATS = ["click", "toggle", "ring", "answer", "notify", "step", "whoosh", "flash", "pop", "hangup", "money", "edit"];
4
4
  /** Each beat's names, its default and where it plays; the composition bundles `<beat>__<name>.mp3` for each, and a test keeps the two equal. */
5
5
  export const TEMPLATE_SOUNDS = {
6
- click: { default: "click_mouse", names: ["click_mouse", "click_soft", "click_crisp", "click_light"],
6
+ click: { default: "click_mouse", names: ["click_mouse", "click_soft", "click_crisp", "click_light", "tick_soft", "click_sharp", "key"],
7
7
  plays: "a checklist's cursor clicks a row, on each click" },
8
8
  toggle: { default: "switch_flip", names: ["switch_flip", "toggle_snap", "switch_heavy", "switch_light"],
9
9
  plays: "a checklist row's switch or check box lands, just after each click" },
@@ -11,17 +11,18 @@ export const TEMPLATE_SOUNDS = {
11
11
  plays: "a phone_call rings from its pop, repeating, until it is answered; over a call it rings ring_double once, before the first line" },
12
12
  answer: { default: "answer_confirm", names: ["answer_confirm", "answer_open", "answer_pop", "answer_select", "pickup"],
13
13
  plays: "a phone_call is answered, on answer_at" },
14
- notify: { default: "chime", names: ["chime", "glass_ping", "glass_soft", "bong", "question_ping"], plays: "a notification drops in" },
15
- step: { default: "drop", names: ["drop", "drop_high", "tick", "pluck", "pluck_bright"], plays: "a progress step fills, and each rating star" },
16
- whoosh: { default: "whoosh", names: ["whoosh", "whip", "paper_swipe", "sweep", "slide_quick"],
14
+ notify: { default: "chime", names: ["chime", "glass_ping", "glass_soft", "bong", "question_ping", "thud", "ding"], plays: "a notification drops in" },
15
+ step: { default: "thud", names: ["drop", "drop_high", "tick", "pluck", "pluck_bright", "thud", "blip", "marker"],
16
+ plays: "a progress step fills, and each rating star" },
17
+ whoosh: { default: "whoosh", names: ["whoosh", "whip", "paper_swipe", "sweep", "slide_quick", "swish_short", "whoosh_soft", "rise"],
17
18
  plays: "a full-frame template's wipe or zoom, in and out, and a compare's reveal; on make_faceless, each light leak cut, its peak on the cut" },
18
19
  flash: { default: "shutter", names: ["shutter", "glitch", "swish"],
19
20
  plays: "a full-frame template's flash, on each of its cuts; on make_faceless, each flash cut, its peak on the cut" },
20
- pop: { default: "plop", names: ["plop"], plays: "a tag or a callout pops in" },
21
+ pop: { default: "plop", names: ["plop", "thud", "blip", "stamp", "popper"], plays: "a tag or a callout pops in" },
21
22
  hangup: { default: "phone", names: ["phone"], plays: "an answered phone_call hangs up, just before it leaves" },
22
- money: { default: "cash_register", names: ["cash_register", "coins"], plays: "a stat with a currency sign in its prefix or suffix counts up" },
23
+ money: { default: "cash_register", names: ["cash_register", "coins", "confetti", "popper"], plays: "a stat with a currency sign in its prefix or suffix counts up" },
23
24
  edit: { default: "air_whoosh", names: ["air_whoosh", "swing", "swipe", "swell_hit", "whoosh_deep", "whoosh_low", "boom_low", "sub_drop", "riser_boom",
24
- "riser_hit"],
25
+ "riser_hit", "thud", "stamp", "swish_short", "whoosh_soft", "rise"],
25
26
  plays: "with edit_sounds, each cut: to or from an insert, a full-frame template's cut without its own whoosh or flash, a layout window's in and out; " +
26
27
  "on make_faceless, every scene change; its peak lands on the cut" },
27
28
  };
@@ -1 +1 @@
1
- {"version":3,"file":"sounds.js","sourceRoot":"","sources":["../../src/templates/sounds.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,+EAA+E;AAE/E,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,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AC/C,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QACtI,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;IAC9B,gBAAgB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CACpC,CAAC,CAAC;AAGH,MAAM,UAAU,kBAAkB;IAChC,OAAO,oBAAoB,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC;QAC9H,KAAK,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC;AAC3C,CAAC"}
@@ -61,7 +61,16 @@ export declare const trendSort: z.ZodEnum<{
61
61
  x: "x";
62
62
  x_size_norm: "x_size_norm";
63
63
  }>;
64
- export declare const TREND_REASON_SIGNALS: readonly ["x", "late_takeoff", "new_creator", "size_norm", "comments", "views_per_hour", "funnel", "short", "views"];
64
+ export declare const TREND_REASON_SIGNALS: readonly ["takeoff", "x", "x_at_age", "late_takeoff", "new_creator", "size_norm", "comments", "views_per_hour", "funnel", "short", "views"];
65
+ /** A reel measured more than once (#1201): speed now is read between two measurements at least this far apart. */
66
+ export declare const TREND_SPEED_MIN_GAP_HOURS = 1;
67
+ /** x at age compares the reel with the creator's other videos measured at an age within this factor of its own, at least this many. */
68
+ export declare const TREND_X_AT_AGE_WINDOW = 1.5;
69
+ export declare const TREND_X_AT_AGE_MIN_VIDEOS = 3;
70
+ /** A take-off: not slowing (accel at least 1) at `rising` from the creator's top line, `surging` from 3× it, never for a new creator. */
71
+ export declare const TREND_TAKEOFF_TIERS: readonly ["surging", "rising"];
72
+ export declare const TREND_TAKEOFF_MIN_ACCEL = 1;
73
+ export declare const TREND_SURGING_X = 3;
65
74
  export declare const TREND_SEARCH_STATES: readonly ["queued", "searching", "succeeded", "failed"];
66
75
  export declare const TREND_SEARCH_ERRORS: readonly ["timed_out", "no_results", "source_failed", "enqueue_failed"];
67
76
  export type TrendSearchError = (typeof TREND_SEARCH_ERRORS)[number];
@@ -95,9 +104,11 @@ export declare const trendReason: z.ZodObject<{
95
104
  new_creator: "new_creator";
96
105
  short: "short";
97
106
  size_norm: "size_norm";
107
+ takeoff: "takeoff";
98
108
  views: "views";
99
109
  views_per_hour: "views_per_hour";
100
110
  x: "x";
111
+ x_at_age: "x_at_age";
101
112
  }>;
102
113
  text: z.ZodString;
103
114
  }, z.core.$strict>;
@@ -137,6 +148,15 @@ export declare const trendReel: z.ZodObject<{
137
148
  comment_rate_x: z.ZodNullable<z.ZodNumber>;
138
149
  size_norm_views: z.ZodNullable<z.ZodNumber>;
139
150
  x_size_norm: z.ZodNullable<z.ZodNumber>;
151
+ measurements: z.ZodNumber;
152
+ previous_measured_at: z.ZodNullable<z.ZodString>;
153
+ speed_now: z.ZodNullable<z.ZodNumber>;
154
+ accel: z.ZodNullable<z.ZodNumber>;
155
+ x_at_age: z.ZodNullable<z.ZodNumber>;
156
+ takeoff: z.ZodNullable<z.ZodEnum<{
157
+ rising: "rising";
158
+ surging: "surging";
159
+ }>>;
140
160
  reasons: z.ZodArray<z.ZodObject<{
141
161
  signal: z.ZodEnum<{
142
162
  comments: "comments";
@@ -145,9 +165,11 @@ export declare const trendReel: z.ZodObject<{
145
165
  new_creator: "new_creator";
146
166
  short: "short";
147
167
  size_norm: "size_norm";
168
+ takeoff: "takeoff";
148
169
  views: "views";
149
170
  views_per_hour: "views_per_hour";
150
171
  x: "x";
172
+ x_at_age: "x_at_age";
151
173
  }>;
152
174
  text: z.ZodString;
153
175
  }, z.core.$strict>>;
@@ -194,6 +216,15 @@ export declare const trendResult: z.ZodObject<{
194
216
  comment_rate_x: z.ZodNullable<z.ZodNumber>;
195
217
  size_norm_views: z.ZodNullable<z.ZodNumber>;
196
218
  x_size_norm: z.ZodNullable<z.ZodNumber>;
219
+ measurements: z.ZodNumber;
220
+ previous_measured_at: z.ZodNullable<z.ZodString>;
221
+ speed_now: z.ZodNullable<z.ZodNumber>;
222
+ accel: z.ZodNullable<z.ZodNumber>;
223
+ x_at_age: z.ZodNullable<z.ZodNumber>;
224
+ takeoff: z.ZodNullable<z.ZodEnum<{
225
+ rising: "rising";
226
+ surging: "surging";
227
+ }>>;
197
228
  reasons: z.ZodArray<z.ZodObject<{
198
229
  signal: z.ZodEnum<{
199
230
  comments: "comments";
@@ -202,9 +233,11 @@ export declare const trendResult: z.ZodObject<{
202
233
  new_creator: "new_creator";
203
234
  short: "short";
204
235
  size_norm: "size_norm";
236
+ takeoff: "takeoff";
205
237
  views: "views";
206
238
  views_per_hour: "views_per_hour";
207
239
  x: "x";
240
+ x_at_age: "x_at_age";
208
241
  }>;
209
242
  text: z.ZodString;
210
243
  }, z.core.$strict>>;
@@ -298,6 +331,15 @@ export declare const trendSearchAnswer: z.ZodObject<{
298
331
  comment_rate_x: z.ZodNullable<z.ZodNumber>;
299
332
  size_norm_views: z.ZodNullable<z.ZodNumber>;
300
333
  x_size_norm: z.ZodNullable<z.ZodNumber>;
334
+ measurements: z.ZodNumber;
335
+ previous_measured_at: z.ZodNullable<z.ZodString>;
336
+ speed_now: z.ZodNullable<z.ZodNumber>;
337
+ accel: z.ZodNullable<z.ZodNumber>;
338
+ x_at_age: z.ZodNullable<z.ZodNumber>;
339
+ takeoff: z.ZodNullable<z.ZodEnum<{
340
+ rising: "rising";
341
+ surging: "surging";
342
+ }>>;
301
343
  reasons: z.ZodArray<z.ZodObject<{
302
344
  signal: z.ZodEnum<{
303
345
  comments: "comments";
@@ -306,9 +348,11 @@ export declare const trendSearchAnswer: z.ZodObject<{
306
348
  new_creator: "new_creator";
307
349
  short: "short";
308
350
  size_norm: "size_norm";
351
+ takeoff: "takeoff";
309
352
  views: "views";
310
353
  views_per_hour: "views_per_hour";
311
354
  x: "x";
355
+ x_at_age: "x_at_age";
312
356
  }>;
313
357
  text: z.ZodString;
314
358
  }, z.core.$strict>>;
@@ -414,6 +458,28 @@ export declare function trendCoverUrl(raw: string | null | undefined): string |
414
458
  export declare function trendFunnelWord(caption: string | null | undefined): string | null;
415
459
  /** A creator is one handle on one platform: the same handle on the other platform is another account with its own median. */
416
460
  export declare const trendCreatorKey: (reel: Pick<TrendSourceReel, "platform" | "handle">) => string;
461
+ /** A video by `platform:id`, the key a creator's page read names it by; `null` when the link names no video. */
462
+ export declare function trendReelKey(reel: Pick<TrendSourceReel, "platform" | "url">): string | null;
463
+ /** One measurement of a video's views (#1201). */
464
+ export interface TrendPoint {
465
+ at: Date;
466
+ views: number;
467
+ }
468
+ /** A creator's video with its measurements so far. */
469
+ export interface TrendPoolVideo {
470
+ key: string;
471
+ postedAt: Date | null;
472
+ points: readonly TrendPoint[];
473
+ }
474
+ type Momentum = Pick<TrendReel, "measurements" | "previous_measured_at" | "speed_now" | "accel" | "x_at_age">;
475
+ /** A reel's numbers across measurements: speed between its last two at least an hour apart, that speed over the one before it (the */
476
+ /** posting time counts as zero views), and its views over the creator's other videos measured at about its age. No extrapolation. */
477
+ export declare function trendMomentum(reel: {
478
+ postedAt: Date | null;
479
+ series: readonly TrendPoint[];
480
+ }, peers: readonly TrendPoolVideo[]): Momentum;
481
+ /** The take-off tier of a card: strong cases only. */
482
+ export declare function trendTakeoff(card: Pick<TrendReel, "x_median" | "x_at_age" | "accel" | "new_creator">): TrendReel["takeoff"];
417
483
  /** The reels worth a creator read: in the window, with views and a known handle, the best per creator, half by views and half by views per */
418
484
  /** follower, a free stand-in for x that finds a small creator's breakout which raw views miss. */
419
485
  export declare function shortlistTrendReels(reels: readonly TrendSourceReel[], request: Pick<FindTrendsRequest, "language" | "posted_within_days">, now: Date, limit?: number): {
@@ -423,11 +489,18 @@ export declare function shortlistTrendReels(reels: readonly TrendSourceReel[], r
423
489
  type ReelSignals = Pick<TrendReel, "top" | "views_per_hour" | "x_preliminary" | "new_creator" | "late_takeoff" | "comment_rate">;
424
490
  /** What a card reads off a reel, from fields the search already holds: no source call. */
425
491
  export declare function trendReelSignals(reel: Pick<TrendReel, "posted_at" | "views" | "comments" | "creator_median_views" | "x_median">, measuredAt: string): ReelSignals;
426
- type ReasonFields = Pick<TrendReel, "x_median" | "new_creator" | "late_takeoff" | "age_days" | "x_size_norm" | "comment_rate_x" | "views_per_hour" | "views" | "funnel" | "duration_s">;
427
- /** Why a card is here, strongest first, each number read from the card: ratios of at least the top line by size, then speed and mechanics. */
492
+ type ReasonFields = Pick<TrendReel, "x_median" | "new_creator" | "late_takeoff" | "age_days" | "x_size_norm" | "comment_rate_x" | "views_per_hour" | "views" | "funnel" | "duration_s" | "takeoff" | "speed_now" | "accel" | "x_at_age">;
493
+ /** Why a card is here, strongest first, each number read from the card: a take-off now, ratios of at least the top line by size, then speed */
494
+ /** and mechanics. */
428
495
  export declare function trendReelReasons(reel: ReasonFields): TrendReason[];
496
+ /** A creator's page as this search read it, by `trendCreatorKey`. */
497
+ export type TrendCreatorPage = readonly {
498
+ key: string;
499
+ postedAt: Date | null;
500
+ views: number | null;
501
+ }[];
429
502
  /** The result from the shortlist, each creator's latest views and comments by `trendCreatorKey` (`null`: the read failed) and the usual */
430
- /** views by `trendSizeNormKey`; unknowns named in warnings. */
503
+ /** views by `trendSizeNormKey`; with `pages` and `history` (#1201) its measurements across time; unknowns named in warnings. */
431
504
  export declare function buildTrendResult(input: {
432
505
  found: number;
433
506
  inWindow: number;
@@ -435,13 +508,15 @@ export declare function buildTrendResult(input: {
435
508
  creatorViews: ReadonlyMap<string, readonly (number | null)[] | null>;
436
509
  creatorComments?: ReadonlyMap<string, readonly (number | null)[] | null>;
437
510
  sizeNorms?: ReadonlyMap<string, number>;
511
+ pages?: ReadonlyMap<string, TrendCreatorPage | null>;
512
+ history?: ReadonlyMap<string, readonly TrendPoolVideo[]>;
438
513
  measuredAt: Date;
439
514
  }): {
440
515
  result: TrendResult;
441
516
  warnings: string[];
442
517
  };
443
- /** An older stored result reads in stored order: before the mix (#1154) it gains the row's platform and the signals of its fields, before */
444
- /** #917 an unknown cover and the funnel of its caption, before #1200 unknown norms and the reasons of its fields. */
518
+ /** An older stored result reads in stored order, gaining what it predates: the row's platform and signals (#1154), an unknown cover and */
519
+ /** its caption's funnel (#917), unknown norms and reasons (#1200), one measurement (none without views) and no speed (#1201). */
445
520
  export declare function storedTrendResult(result: unknown, platform: TrendPlatform): unknown;
446
521
  /** The reels in another order, highest first with unknowns last and ties in the written ranking; `best` is that ranking. */
447
522
  export declare function sortTrendReels(reels: readonly TrendReel[], sort: TrendSort): TrendReel[];
@@ -54,7 +54,17 @@ export const trendSizeNormKey = (platform, followers) => `${platform}:${trendSiz
54
54
  export const TREND_SORTS = ["best", "x", "x_size_norm", "views", "views_per_hour", "comment_rate", "comment_rate_x"];
55
55
  export const trendSort = z.enum(TREND_SORTS)
56
56
  .describe("The order of the reels: best (default), or the highest first of x, x_size_norm, views, views_per_hour, comment_rate or comment_rate_x. Free.");
57
- export const TREND_REASON_SIGNALS = ["x", "late_takeoff", "new_creator", "size_norm", "comments", "views_per_hour", "funnel", "short", "views"];
57
+ export const TREND_REASON_SIGNALS = ["takeoff", "x", "x_at_age", "late_takeoff", "new_creator", "size_norm", "comments", "views_per_hour", "funnel", "short",
58
+ "views"];
59
+ /** A reel measured more than once (#1201): speed now is read between two measurements at least this far apart. */
60
+ export const TREND_SPEED_MIN_GAP_HOURS = 1;
61
+ /** x at age compares the reel with the creator's other videos measured at an age within this factor of its own, at least this many. */
62
+ export const TREND_X_AT_AGE_WINDOW = 1.5;
63
+ export const TREND_X_AT_AGE_MIN_VIDEOS = 3;
64
+ /** A take-off: not slowing (accel at least 1) at `rising` from the creator's top line, `surging` from 3× it, never for a new creator. */
65
+ export const TREND_TAKEOFF_TIERS = ["surging", "rising"];
66
+ export const TREND_TAKEOFF_MIN_ACCEL = 1;
67
+ export const TREND_SURGING_X = 3;
58
68
  export const TREND_SEARCH_STATES = ["queued", "searching", "succeeded", "failed"];
59
69
  export const TREND_SEARCH_ERRORS = ["timed_out", "no_results", "source_failed", "enqueue_failed"];
60
70
  export const TREND_SEARCH_ERROR_MESSAGES = {
@@ -105,6 +115,16 @@ export const trendReel = z.strictObject({
105
115
  size_norm_views: z.number().int().nonnegative().nullable()
106
116
  .describe("The usual views of an account with about as many followers; null when the followers are unknown or too few such accounts are known."),
107
117
  x_size_norm: z.number().nonnegative().nullable().describe("views over size_norm_views, one decimal; null when either is unknown or the norm is 0."),
118
+ measurements: z.number().int().nonnegative().describe("How many times the reel's views have been measured, this search included."),
119
+ previous_measured_at: z.string().datetime().nullable().describe("The measurement speed_now is read from, at least an hour before measured_at; null when none."),
120
+ speed_now: z.number().int().nonnegative().nullable()
121
+ .describe("views per hour between previous_measured_at and measured_at; null with fewer than two such measurements."),
122
+ accel: z.number().nonnegative().nullable()
123
+ .describe("speed_now over the views per hour of the interval before it, two decimals rounded down: 1 or more, the reel is not slowing; null when either is unknown."),
124
+ x_at_age: z.number().nonnegative().nullable()
125
+ .describe(`views over the median views of the creator's other videos measured at about the same age, one decimal; null under ${TREND_X_AT_AGE_MIN_VIDEOS} such videos.`),
126
+ takeoff: z.enum(TREND_TAKEOFF_TIERS).nullable().describe(`surging: accel at least ${TREND_TAKEOFF_MIN_ACCEL} and x_at_age (else x_median) at least ` +
127
+ `${TREND_SURGING_X}; rising: the same with ${CREATOR_TOP_X} or more; null otherwise and for a new creator.`),
108
128
  reasons: z.array(trendReason).min(1).max(TREND_REASONS_MAX).describe("Why the reel is here, strongest first; each number is a field of this card."),
109
129
  cover: z.string().url().nullable().describe("The platform's preview image; it expires."),
110
130
  funnel: z.string().min(1).max(TREND_FUNNEL_MAX_CHARS).nullable()
@@ -204,6 +224,61 @@ const DAY_MS = 86_400_000, HOUR_MS = 3_600_000;
204
224
  const oneDecimal = (value) => Math.round(value * 10) / 10;
205
225
  /** A creator is one handle on one platform: the same handle on the other platform is another account with its own median. */
206
226
  export const trendCreatorKey = (reel) => `${reel.platform}:${reel.handle.toLowerCase()}`;
227
+ /** A video by `platform:id`, the key a creator's page read names it by; `null` when the link names no video. */
228
+ export function trendReelKey(reel) {
229
+ const id = /\/(?:reel|video)\/([^/?#]+)\/?$/.exec(reel.url)?.[1];
230
+ return id === undefined ? null : `${reel.platform}:${id}`;
231
+ }
232
+ const hoursBetween = (from, to) => (to.getTime() - from.getTime()) / HOUR_MS;
233
+ /** A reel's numbers across measurements: speed between its last two at least an hour apart, that speed over the one before it (the */
234
+ /** posting time counts as zero views), and its views over the creator's other videos measured at about its age. No extrapolation. */
235
+ export function trendMomentum(reel, peers) {
236
+ const series = [...reel.series].sort((a, b) => a.at.getTime() - b.at.getTime());
237
+ const last = series.at(-1);
238
+ const before = (point) => {
239
+ const earlier = series.filter((other) => hoursBetween(other.at, point.at) >= TREND_SPEED_MIN_GAP_HOURS).at(-1);
240
+ if (earlier !== undefined)
241
+ return earlier;
242
+ return reel.postedAt !== null && hoursBetween(reel.postedAt, point.at) >= TREND_SPEED_MIN_GAP_HOURS ? { at: reel.postedAt, views: 0 } : null;
243
+ };
244
+ const measured = last === undefined ? undefined : series.filter((other) => hoursBetween(other.at, last.at) >= TREND_SPEED_MIN_GAP_HOURS).at(-1);
245
+ const speed = (from, to) => Math.max(0, to.views - from.views) / hoursBetween(from.at, to.at);
246
+ const speedNow = last === undefined || measured === undefined ? null : speed(measured, last);
247
+ const prior = measured === undefined ? null : before(measured);
248
+ const priorSpeed = prior === null || measured === undefined ? null : speed(prior, measured);
249
+ return {
250
+ measurements: series.length,
251
+ previous_measured_at: measured?.at.toISOString() ?? null,
252
+ speed_now: speedNow === null ? null : Math.round(speedNow),
253
+ // Rounded down, so a reel slowing by a hair never reads 1.00 and never reaches a take-off tier.
254
+ accel: speedNow === null || priorSpeed === null || priorSpeed === 0 ? null : Math.floor((speedNow / priorSpeed) * 100) / 100,
255
+ x_at_age: last === undefined || reel.postedAt === null ? null : xAtAge(last, hoursBetween(reel.postedAt, last.at), peers),
256
+ };
257
+ }
258
+ function xAtAge(last, ageHours, peers) {
259
+ if (ageHours < TREND_SPEED_MIN_GAP_HOURS)
260
+ return null;
261
+ const views = peers.flatMap((peer) => {
262
+ if (peer.postedAt === null)
263
+ return [];
264
+ // The window's bounds are compared as ages, inclusive both ways; the log only orders the points inside it.
265
+ const near = peer.points.map((point) => ({ point, age: hoursBetween(peer.postedAt, point.at) }))
266
+ .filter(({ age }) => age * TREND_X_AT_AGE_WINDOW >= ageHours && age <= ageHours * TREND_X_AT_AGE_WINDOW)
267
+ .sort((a, b) => Math.abs(Math.log(a.age / ageHours)) - Math.abs(Math.log(b.age / ageHours)))[0];
268
+ return near === undefined ? [] : [near.point.views];
269
+ });
270
+ if (views.length < TREND_X_AT_AGE_MIN_VIDEOS)
271
+ return null;
272
+ const median = medianOf(views);
273
+ return median === null || median === 0 ? null : oneDecimal(last.views / median);
274
+ }
275
+ /** The take-off tier of a card: strong cases only. */
276
+ export function trendTakeoff(card) {
277
+ const x = card.x_at_age ?? card.x_median;
278
+ if (card.new_creator || card.accel === null || x === null || card.accel < TREND_TAKEOFF_MIN_ACCEL)
279
+ return null;
280
+ return x >= TREND_SURGING_X ? "surging" : x >= CREATOR_TOP_X ? "rising" : null;
281
+ }
207
282
  function captionOf(text) {
208
283
  const trimmed = text?.trim() ?? "";
209
284
  if (trimmed === "")
@@ -262,7 +337,8 @@ function creatorCommentRate(views, comments) {
262
337
  return rates.length < TREND_COMMENT_NORM_MIN_VIDEOS ? null : medianOf(rates);
263
338
  }
264
339
  const times = (value) => `${value.toFixed(1)}×`;
265
- /** Why a card is here, strongest first, each number read from the card: ratios of at least the top line by size, then speed and mechanics. */
340
+ /** Why a card is here, strongest first, each number read from the card: a take-off now, ratios of at least the top line by size, then speed */
341
+ /** and mechanics. */
266
342
  export function trendReelReasons(reel) {
267
343
  const ratios = [];
268
344
  if (reel.x_median !== null && !reel.new_creator && reel.x_median >= CREATOR_TOP_X) {
@@ -270,6 +346,9 @@ export function trendReelReasons(reel) {
270
346
  ? { signal: "late_takeoff", strength: reel.x_median, text: `${times(reel.x_median)} the creator's median after ${reel.age_days} days` }
271
347
  : { signal: "x", strength: reel.x_median, text: `${times(reel.x_median)} the creator's median` });
272
348
  }
349
+ if (reel.x_at_age !== null && !reel.new_creator && reel.x_at_age >= CREATOR_TOP_X) {
350
+ ratios.push({ signal: "x_at_age", strength: reel.x_at_age, text: `${times(reel.x_at_age)} the creator's usual at this age` });
351
+ }
273
352
  if (reel.x_size_norm !== null && reel.x_size_norm >= CREATOR_TOP_X) {
274
353
  ratios.push({ signal: "size_norm", strength: reel.x_size_norm, text: `${times(reel.x_size_norm)} the usual views for this many followers` });
275
354
  }
@@ -277,7 +356,10 @@ export function trendReelReasons(reel) {
277
356
  ratios.push({ signal: "comments", strength: reel.comment_rate_x, text: `comments ${times(reel.comment_rate_x)} the creator's norm` });
278
357
  }
279
358
  const speed = reel.views_per_hour === null ? null : `${reel.views_per_hour.toLocaleString("en-US")} views/h`;
359
+ const takeoff = reel.takeoff === null || reel.speed_now === null || reel.accel === null ? []
360
+ : [{ signal: "takeoff", text: `${reel.takeoff}: ${reel.speed_now.toLocaleString("en-US")} views/h now, ${reel.accel.toFixed(2)}× the speed before` }];
280
361
  const reasons = [
362
+ ...takeoff,
281
363
  ...(reel.new_creator && speed !== null ? [{ signal: "new_creator", text: `new creator, ${speed}` }] : []),
282
364
  ...ratios.sort((a, b) => b.strength - a.strength).map(({ signal, text }) => ({ signal, text })),
283
365
  ...(!reel.new_creator && speed !== null ? [{ signal: "views_per_hour", text: speed }] : []),
@@ -287,8 +369,23 @@ export function trendReelReasons(reel) {
287
369
  return reasons.length > 0 ? reasons
288
370
  : [{ signal: "views", text: reel.views === null ? "views unknown" : `${reel.views.toLocaleString("en-US")} views` }];
289
371
  }
372
+ /** Each reel's measurements and its creator's other videos: the stored ones before this search, then this search's own reads. */
373
+ function momentumOf(reel, at, stored, page) {
374
+ const key = trendReelKey(reel);
375
+ const videos = new Map(stored.map((video) => [video.key, { postedAt: video.postedAt, points: [...video.points] }]));
376
+ for (const video of page ?? []) {
377
+ if (video.views === null || video.key === key)
378
+ continue;
379
+ const held = videos.get(video.key) ?? { postedAt: video.postedAt, points: [] };
380
+ videos.set(video.key, { postedAt: held.postedAt ?? video.postedAt, points: [...held.points, { at, views: video.views }] });
381
+ }
382
+ const own = key === null ? [] : videos.get(key)?.points ?? [];
383
+ const series = [...own.filter((point) => point.at.getTime() < at.getTime()), ...(reel.views === null ? [] : [{ at, views: reel.views }])];
384
+ const peers = [...videos].flatMap(([peerKey, video]) => (peerKey === key ? [] : [{ key: peerKey, ...video }]));
385
+ return trendMomentum({ postedAt: reel.postedAt, series }, peers);
386
+ }
290
387
  /** The result from the shortlist, each creator's latest views and comments by `trendCreatorKey` (`null`: the read failed) and the usual */
291
- /** views by `trendSizeNormKey`; unknowns named in warnings. */
388
+ /** views by `trendSizeNormKey`; with `pages` and `history` (#1201) its measurements across time; unknowns named in warnings. */
292
389
  export function buildTrendResult(input) {
293
390
  const now = input.measuredAt.getTime(), measuredAt = input.measuredAt.toISOString();
294
391
  const reels = input.shortlist.map((reel) => {
@@ -306,8 +403,10 @@ export function buildTrendResult(input) {
306
403
  const rate = reel.comments === null || reel.views === null || reel.views === 0 ? null : reel.comments / reel.views;
307
404
  const card = { ...base, ...trendReelSignals(base, measuredAt), creator_comment_rate: commentNorm === null ? null : fourDecimals(commentNorm),
308
405
  comment_rate_x: rate === null ? null : ratio(rate, commentNorm), size_norm_views: sizeNormViews, x_size_norm: ratio(reel.views, sizeNormViews),
309
- cover: trendCoverUrl(reel.cover), funnel: trendFunnelWord(reel.caption) };
310
- return { ...card, reasons: trendReelReasons(card) };
406
+ cover: trendCoverUrl(reel.cover), funnel: trendFunnelWord(reel.caption),
407
+ ...momentumOf(reel, input.measuredAt, input.history?.get(trendCreatorKey(reel)) ?? [], input.pages?.get(trendCreatorKey(reel)) ?? null) };
408
+ const timed = { ...card, takeoff: trendTakeoff(card) };
409
+ return { ...timed, reasons: trendReelReasons(timed) };
311
410
  }).sort(byRank);
312
411
  const warnings = [];
313
412
  const unread = reels.filter((reel) => reel.creator_median_views === null).length;
@@ -321,13 +420,22 @@ export function buildTrendResult(input) {
321
420
  if (noSizeNorm > 0) {
322
421
  warnings.push(`x_size_norm: the followers, or the usual views for that many, are unknown for ${noSizeNorm} of ${reels.length} reels; null there`);
323
422
  }
423
+ const unmeasured = reels.filter((reel) => reel.speed_now === null).length;
424
+ if (unmeasured > 0) {
425
+ warnings.push(`speed_now: ${unmeasured} of ${reels.length} reels have no two measurements an hour apart yet; speed_now, accel and takeoff are null there`);
426
+ }
427
+ const noAgeNorm = reels.filter((reel) => reel.x_at_age === null).length;
428
+ if (noAgeNorm > 0) {
429
+ warnings.push(`x_at_age: fewer than ${TREND_X_AT_AGE_MIN_VIDEOS} of the creator's other videos were measured at about the same age for ` +
430
+ `${noAgeNorm} of ${reels.length} reels; null there`);
431
+ }
324
432
  if (input.found > 0 && input.inWindow < input.found) {
325
433
  warnings.push(`window: ${input.found - input.inWindow} of ${input.found} reels found were older than the window, in another language or without a view count, and were left out`);
326
434
  }
327
435
  return { result: trendResult.parse({ measured_at: measuredAt, found: input.found, in_window: input.inWindow, reels }), warnings };
328
436
  }
329
- /** An older stored result reads in stored order: before the mix (#1154) it gains the row's platform and the signals of its fields, before */
330
- /** #917 an unknown cover and the funnel of its caption, before #1200 unknown norms and the reasons of its fields. */
437
+ /** An older stored result reads in stored order, gaining what it predates: the row's platform and signals (#1154), an unknown cover and */
438
+ /** its caption's funnel (#917), unknown norms and reasons (#1200), one measurement (none without views) and no speed (#1201). */
331
439
  export function storedTrendResult(result, platform) {
332
440
  if (result === null || typeof result !== "object" || !Array.isArray(result.reels))
333
441
  return result;
@@ -336,7 +444,9 @@ export function storedTrendResult(result, platform) {
336
444
  const signed = platform === "mix" || "views_per_hour" in reel ? reel
337
445
  : { ...reel, platform, ...trendReelSignals(reel, stored.measured_at) };
338
446
  const caption = reel.caption?.text;
339
- const covered = "funnel" in signed ? signed : { ...signed, cover: null, funnel: trendFunnelWord(typeof caption === "string" ? caption : null) };
447
+ const funneled = "funnel" in signed ? signed : { ...signed, cover: null, funnel: trendFunnelWord(typeof caption === "string" ? caption : null) };
448
+ const covered = "measurements" in funneled ? funneled : { ...funneled, measurements: typeof funneled.views === "number" ? 1 : 0,
449
+ previous_measured_at: null, speed_now: null, accel: null, x_at_age: null, takeoff: null };
340
450
  if ("reasons" in covered)
341
451
  return covered;
342
452
  const normed = { ...covered, creator_comment_rate: null, comment_rate_x: null, size_norm_views: null, x_size_norm: null };
@@ -375,9 +485,11 @@ export function trendSearchMarkdown(answer) {
375
485
  `${result.found} found, ${result.in_window} in the window, ${result.reels.length} with their creator's median`, `- Measured ${result.measured_at.slice(0, 16).replace("T", " ")} UTC${answer.sort === "best" ? "" : ` · ordered by ${answer.sort}`}`, "", "| # | Platform | Creator | Posted | Views | Views/h | x median | x size | Comments × | Creator median | Length | Caption |", "|---:|---|---|---|---:|---:|---:|---:|---:|---:|---:|---|");
376
486
  const handle = (reel) => `@${reel.creator.handle.replace(/_/g, "\\_")}`;
377
487
  const ratioCell = (value) => (value === null ? "—" : times(value));
488
+ const speedCell = (reel) => `${number(reel.views_per_hour)}${reel.speed_now === null ? "" : ` · now ${number(reel.speed_now)}` +
489
+ `${reel.accel === null ? "" : ` (${reel.accel.toFixed(2)}×)`}${reel.takeoff === null ? "" : ` **${reel.takeoff}**`}`}`;
378
490
  result.reels.forEach((reel, index) => {
379
491
  lines.push(`| [${index + 1}](${reel.url}) | ${TREND_PLATFORM_NAMES[reel.platform]} | ${handle(reel)} | ` +
380
- `${reel.posted_at?.slice(0, 10) ?? "—"} | ${number(reel.views)} | ${number(reel.views_per_hour)} | ${xCell(reel)} | ${ratioCell(reel.x_size_norm)} | ` +
492
+ `${reel.posted_at?.slice(0, 10) ?? "—"} | ${number(reel.views)} | ${speedCell(reel)} | ${xCell(reel)} | ${ratioCell(reel.x_size_norm)} | ` +
381
493
  `${ratioCell(reel.comment_rate_x)} | ${number(reel.creator_median_views)} | ` +
382
494
  `${reel.duration_s === null ? "—" : `${Math.round(reel.duration_s)} s`} | ${reel.caption ? quote(reel.caption.text, 60) : "—"} |`);
383
495
  });
@@ -389,6 +501,10 @@ export function trendSearchMarkdown(answer) {
389
501
  lines.push("", top ? `Took off (bold, at least ${CREATOR_TOP_X}× the creator's median): ${top}.` : `No reel reaches ${CREATOR_TOP_X}× its creator's median.`);
390
502
  if (late)
391
503
  lines.push(`Late take-offs (older than ${TREND_PRELIMINARY_HOURS} h, at least ${TREND_LATE_TAKEOFF_X}×): ${late}.`);
504
+ if (result.reels.some((reel) => reel.speed_now !== null)) {
505
+ const now = result.reels.filter((reel) => reel.takeoff !== null).length;
506
+ lines.push(`now: views per hour since the previous measurement, (×) against the speed before it. Taking off now (surging or rising): ${now}.`);
507
+ }
392
508
  if (result.reels.some((reel) => reel.x_preliminary))
393
509
  lines.push(`early: under ${TREND_PRELIMINARY_HOURS} h old, x is still growing.`);
394
510
  if (result.reels.some((reel) => reel.new_creator)) {
@@ -401,7 +517,7 @@ export function trendSearchMarkdown(answer) {
401
517
  }
402
518
  export const FIND_TRENDS_DESCRIPTION = `Reels that took off on a topic: up to ${TREND_SEARCH_REELS} per platform, one per creator, TikTok and Instagram in one ranking by ` +
403
519
  "x_median (views over the creator's median). Charged only on success, a mix that reached one platform too; " +
404
- `${TREND_SEARCH_PER_HOUR} per hour. poll repeats this call. Each reel says why it is here; the same call with another sort ` +
405
- "reorders the same search for free within the hour.";
520
+ `${TREND_SEARCH_PER_HOUR} per hour. poll repeats this call. Each reel says why it is here, and a reel measured before carries its speed now; ` +
521
+ "the same call with another sort reorders the same search for free within the hour.";
406
522
  export const QUOTE_TRENDS_DESCRIPTION = "Price find_trends: 0 when the same query from the last hour would answer. Free.";
407
523
  //# sourceMappingURL=trend-search.js.map