nixamp 0.77.0 → 0.78.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.
Files changed (86) hide show
  1. package/backtoschool/dist/assets/{ar-Cj5WpObc.js → ar-CYu0byMf.js} +1 -1
  2. package/backtoschool/dist/assets/{cs-DOYgXvWh.js → cs-BTTM7DeB.js} +1 -1
  3. package/backtoschool/dist/assets/{da-CmgimT0P.js → da-iixezQtd.js} +1 -1
  4. package/backtoschool/dist/assets/{de-D_AUWuE3.js → de-Sx3acevR.js} +1 -1
  5. package/backtoschool/dist/assets/{es-B4QfiG7X.js → es-ByCnw8ja.js} +1 -1
  6. package/backtoschool/dist/assets/{fi-Clf9SZn5.js → fi-BCeFoeH5.js} +1 -1
  7. package/backtoschool/dist/assets/{fr-DpLIxvgd.js → fr-Nz5hMzAE.js} +1 -1
  8. package/backtoschool/dist/assets/{hi-a9HR1j7t.js → hi-x5-IG1rl.js} +1 -1
  9. package/backtoschool/dist/assets/hls-CydbS6hn.js +42 -0
  10. package/backtoschool/dist/assets/hls-OR5FY6YP-O3qhTXm4.js +1 -0
  11. package/backtoschool/dist/assets/{hu-CXw_ATKN.js → hu-QqIkGcMe.js} +1 -1
  12. package/backtoschool/dist/assets/{id-B8GHWT99.js → id-OVwO1Uoi.js} +1 -1
  13. package/backtoschool/dist/assets/index-Dgqs6yM_.js +112 -0
  14. package/backtoschool/dist/assets/{it-D8K-Cjn9.js → it-CmssY5Ut.js} +1 -1
  15. package/backtoschool/dist/assets/mpegts-RQlLEU1A.js +3 -0
  16. package/backtoschool/dist/assets/mpegts-Y2FARLFE-y49QH7a5.js +1 -0
  17. package/backtoschool/dist/assets/{nl-BTHM_tIM.js → nl-VkQxlPku.js} +1 -1
  18. package/backtoschool/dist/assets/{ru-cwqVc7z_.js → ru-Dk8FAbDx.js} +1 -1
  19. package/backtoschool/dist/assets/{sv-De7KSFg-.js → sv-CNs1UySx.js} +1 -1
  20. package/backtoschool/dist/assets/{uk-COyId2km.js → uk-BDB1YayY.js} +1 -1
  21. package/backtoschool/dist/assets/{vi-3djg7AGj.js → vi-DnEIKzy7.js} +1 -1
  22. package/backtoschool/dist/assets/{zh-DNAab67I.js → zh-B_atHA4S.js} +1 -1
  23. package/backtoschool/dist/index.html +1 -1
  24. package/dist/ai-label.d.ts +3 -0
  25. package/dist/ai-label.js +392 -10
  26. package/dist/partyline.d.ts +41 -201
  27. package/dist/partyline.js +65 -601
  28. package/dist/veo-studio.d.ts +22 -0
  29. package/dist/veo-studio.js +64 -3
  30. package/package.json +13 -12
  31. package/src/ai-label.ts +391 -9
  32. package/src/partyline.ts +88 -671
  33. package/src/veo-studio.ts +68 -4
  34. package/web/dist/assets/{ar-DvGjcQ2J.js → ar-Dt4ftL7_.js} +1 -1
  35. package/web/dist/assets/background.worker-F49brs4A.js +547 -0
  36. package/web/dist/assets/chunk-55GBNX64-BDcCEJUP.js +1 -0
  37. package/web/dist/assets/client-D7waX8NA.js +1 -0
  38. package/web/dist/assets/{cs-VkeGFdfN.js → cs-D7U7SQMd.js} +1 -1
  39. package/web/dist/assets/{da-BcpK9125.js → da-BcJX_2kR.js} +1 -1
  40. package/web/dist/assets/{de-DMUTObgP.js → de-rl_x2VZN.js} +1 -1
  41. package/web/dist/assets/{es-Cgv5mJmC.js → es-BGrhKZQz.js} +1 -1
  42. package/web/dist/assets/{fi-CZw6yFV4.js → fi-CY2dfbr_.js} +1 -1
  43. package/web/dist/assets/{fr-Cashl2VH.js → fr-BJkwpR_P.js} +1 -1
  44. package/web/dist/assets/{hi-nRs3DZ0Q.js → hi-BrJHlcBX.js} +1 -1
  45. package/web/dist/assets/hls-CydbS6hn.js +42 -0
  46. package/web/dist/assets/hls-OR5FY6YP-_WOdANsC.js +1 -0
  47. package/web/dist/assets/{hu-D6H6n2Li.js → hu-BULQmmjT.js} +1 -1
  48. package/web/dist/assets/{id-DB89Twrj.js → id-Dzh3ujB1.js} +1 -1
  49. package/web/dist/assets/{it-CH9caHnD.js → it-CexE1NXI.js} +1 -1
  50. package/web/dist/assets/main-CsEDH18x.js +26 -0
  51. package/web/dist/assets/mpegts-CL9RC5Ls.js +3 -0
  52. package/web/dist/assets/mpegts-Y2FARLFE-C91SD8Pl.js +1 -0
  53. package/web/dist/assets/music-ByEeUk4Z.js +1 -0
  54. package/web/dist/assets/{nl-vTvT2DVb.js → nl-BPpsDvjT.js} +1 -1
  55. package/web/dist/assets/radio-BnQ78a-O.js +1 -0
  56. package/web/dist/assets/{ru-dpgYvvQ7.js → ru-CmYwwWDR.js} +1 -1
  57. package/web/dist/assets/{station-UibBpdBh.js → station-C_6L4CDU.js} +2 -2
  58. package/web/dist/assets/{sv-gp9SyEIA.js → sv-DnY0WiF0.js} +1 -1
  59. package/web/dist/assets/{uk-DicgOcIK.js → uk-Cm0pAuQa.js} +1 -1
  60. package/web/dist/assets/{vi-m4X3bO3f.js → vi-CgKu2IlV.js} +1 -1
  61. package/web/dist/assets/{vod-CkR6hzN7.js → vod-CbSC5NFA.js} +1 -1
  62. package/web/dist/assets/{watch-BO-wMY8T.js → watch-D-ZRxfJ_.js} +1 -1
  63. package/web/dist/assets/{zh-DPnaJjYS.js → zh-DOa77AtL.js} +1 -1
  64. package/web/dist/index.html +5 -5
  65. package/web/dist/music.html +2 -2
  66. package/web/dist/radio.html +3 -3
  67. package/web/dist/station.html +3 -3
  68. package/web/dist/sw.js +32 -32
  69. package/web/dist/vod.html +3 -3
  70. package/web/dist/watch.html +3 -3
  71. package/backtoschool/dist/assets/hls-OR5FY6YP-nOjNFW0f.js +0 -1
  72. package/backtoschool/dist/assets/hls-n74Cnh8A.js +0 -42
  73. package/backtoschool/dist/assets/index-BPJoeY65.js +0 -112
  74. package/backtoschool/dist/assets/mpegts-7CN75AI2-cUtR703j.js +0 -1
  75. package/backtoschool/dist/assets/mpegts-CixmcUbS.js +0 -3
  76. package/web/dist/assets/background.worker-Hz7oaQ8X.js +0 -547
  77. package/web/dist/assets/chunk-Q2XQMA4B-OBCD3Aev.js +0 -1
  78. package/web/dist/assets/client-B_mfdrFh.js +0 -1
  79. package/web/dist/assets/hls-OR5FY6YP-B2RNEz5K.js +0 -1
  80. package/web/dist/assets/hls-n74Cnh8A.js +0 -42
  81. package/web/dist/assets/main-BS8YvXOs.js +0 -26
  82. package/web/dist/assets/mpegts-7CN75AI2-1Qj6py7N.js +0 -1
  83. package/web/dist/assets/mpegts-BcF3gJrf.js +0 -3
  84. package/web/dist/assets/music-Day-DtFd.js +0 -1
  85. package/web/dist/assets/radio-Dx44o-ug.js +0 -1
  86. /package/web/dist/assets/{chunk-Q2XQMA4B-DR1XNWCJ.css → chunk-55GBNX64-DR1XNWCJ.css} +0 -0
@@ -26,11 +26,25 @@ export interface VeoStudioOptions {
26
26
  falKey?: string;
27
27
  /** What a second of lip sync is counted at under the same monthly cap; deliberately high ($0.10). */
28
28
  lipsyncUsdPerSecond?: number;
29
+ /** gemini-omni-1.1-flash by default; a "veo-..." model is asked the old Veo way. */
29
30
  model?: string;
31
+ /** Omni's resolution: 360p, 720p, 1080p (the default) or 4k. */
32
+ resolution?: string;
30
33
  fetcher?: typeof fetch;
31
34
  now?: () => number;
32
35
  sleep?: (ms: number) => Promise<void>;
33
36
  }
37
+ export declare const OMNI_MODEL = "gemini-omni-1.1-flash";
38
+ /**
39
+ * What an Omni shot cost, from its token counts at Google's rates: $17.50 per
40
+ * million video tokens out, $9 per million thinking, $1.50 per million in.
41
+ * (1080p is about 8,700 video tokens a second, so a 10 s shot is about $1.52.)
42
+ */
43
+ export declare function omniUsd(usage: {
44
+ total_input_tokens?: number;
45
+ total_output_tokens?: number;
46
+ total_thought_tokens?: number;
47
+ } | undefined): number;
34
48
  export declare class VeoStudio {
35
49
  private readonly options;
36
50
  constructor(options: VeoStudioOptions);
@@ -71,4 +85,12 @@ export declare class VeoStudio {
71
85
  }): Promise<Buffer>;
72
86
  private sync;
73
87
  private make;
88
+ /**
89
+ * Gemini Omni Flash, Google's replacement for Veo (Veo 3.1 preview was shut
90
+ * down 2026-10-22): one POST to /interactions answers with the clip inline.
91
+ * It has no length setting and makes about 10 s; the label's cutter takes
92
+ * the seconds it asked for. What it cost comes back as tokens.
93
+ */
94
+ private omni;
95
+ private veo;
74
96
  }
@@ -76,6 +76,19 @@ export function fileLedger(file) {
76
76
  };
77
77
  }
78
78
  const BASE = "https://generativelanguage.googleapis.com/v1beta";
79
+ export const OMNI_MODEL = "gemini-omni-1.1-flash";
80
+ /** Seconds Omni makes for a shot: it takes no length, so a shot is reserved at this. */
81
+ const OMNI_SECONDS = 10;
82
+ /**
83
+ * What an Omni shot cost, from its token counts at Google's rates: $17.50 per
84
+ * million video tokens out, $9 per million thinking, $1.50 per million in.
85
+ * (1080p is about 8,700 video tokens a second, so a 10 s shot is about $1.52.)
86
+ */
87
+ export function omniUsd(usage) {
88
+ if (!usage)
89
+ return 0;
90
+ return ((usage.total_output_tokens ?? 0) * 17.5 + (usage.total_thought_tokens ?? 0) * 9 + (usage.total_input_tokens ?? 0) * 1.5) / 1e6;
91
+ }
79
92
  export class VeoStudio {
80
93
  options;
81
94
  constructor(options) {
@@ -97,14 +110,25 @@ export class VeoStudio {
97
110
  /** One shot: 4, 6 or 8 seconds, 16:9 1080p, with up to three reference images (JPEG). */
98
111
  async clip(input) {
99
112
  const seconds = [4, 6, 8].includes(input.seconds) ? input.seconds : 8;
100
- const cost = seconds * this.rate;
113
+ // Omni makes about 10 s whatever is asked, so that is what is paid for.
114
+ const omni = !(this.options.model ?? OMNI_MODEL).startsWith("veo-");
115
+ const cost = (omni ? OMNI_SECONDS : seconds) * this.rate;
101
116
  const month = this.month();
102
117
  // Reserved first, in one step that will not go over: two at once cannot both squeeze under the cap.
103
118
  if (!(await this.options.ledger.reserve(month, cost, this.cap)))
104
119
  throw new VeoBudgetError(`this month's $${this.cap} of Veo is spent`);
105
120
  try {
106
121
  try {
107
- return await this.make(input.prompt, seconds, input.references.slice(0, 3));
122
+ const made = await this.make(input.prompt, seconds, input.references.slice(0, 3));
123
+ // Settled at what Google says it cost, when it says.
124
+ if (made.usd && made.usd > 0) {
125
+ const off = cost - made.usd;
126
+ if (off > 0)
127
+ await this.options.ledger.refund(month, off).catch(() => undefined);
128
+ else if (off < 0)
129
+ await this.options.ledger.reserve(month, -off, Number.POSITIVE_INFINITY).catch(() => undefined);
130
+ }
131
+ return made.bytes;
108
132
  }
109
133
  catch (error) {
110
134
  // Google out of quota for the day, or its prepaid credit spent: the same Veo on fal.ai.
@@ -200,9 +224,46 @@ export class VeoStudio {
200
224
  return await this.falJob(key, "fal-ai/sync-lipsync/v2/pro", { video_url: videoUrl, audio_url: audioUrl }, "the lip sync");
201
225
  }
202
226
  async make(prompt, seconds, references) {
227
+ const model = this.options.model ?? OMNI_MODEL;
228
+ if (!model.startsWith("veo-"))
229
+ return await this.omni(model, prompt, seconds, references);
230
+ return { bytes: await this.veo(model, prompt, seconds, references) };
231
+ }
232
+ /**
233
+ * Gemini Omni Flash, Google's replacement for Veo (Veo 3.1 preview was shut
234
+ * down 2026-10-22): one POST to /interactions answers with the clip inline.
235
+ * It has no length setting and makes about 10 s; the label's cutter takes
236
+ * the seconds it asked for. What it cost comes back as tokens.
237
+ */
238
+ async omni(model, prompt, seconds, references) {
239
+ const send = this.options.fetcher ?? fetch;
240
+ const text = `${prompt.slice(0, 1800)} A ${seconds}-second shot.`;
241
+ const answer = await send(`${BASE}/interactions`, {
242
+ method: "POST",
243
+ headers: { "x-goog-api-key": this.options.key, "content-type": "application/json" },
244
+ signal: AbortSignal.timeout(10 * 60_000),
245
+ body: JSON.stringify({
246
+ model,
247
+ input: references.length
248
+ ? [...references.map((bytes) => ({ type: "image", data: bytes.toString("base64"), mime_type: "image/jpeg" })), { type: "text", text }]
249
+ : text,
250
+ response_format: { type: "video", aspect_ratio: "16:9", resolution: this.options.resolution ?? "1080p" },
251
+ }),
252
+ });
253
+ const body = await answer.json().catch(() => ({}));
254
+ if (!answer.ok)
255
+ throw new VeoRefused(`Omni refused the shot: ${body.error?.message?.slice(0, 200) ?? `HTTP ${answer.status}`}`);
256
+ const data = body.steps?.flatMap((step) => step.content ?? []).find((one) => one.type === "video" && one.data)?.data;
257
+ if (!data)
258
+ throw new VeoRefused(`Omni made nothing (${body.status ?? "no status"})`);
259
+ const bytes = Buffer.from(data, "base64");
260
+ if (bytes.length < 10_000)
261
+ throw new VeoRefused("the Omni clip was empty");
262
+ return { bytes, usd: omniUsd(body.usage) };
263
+ }
264
+ async veo(model, prompt, seconds, references) {
203
265
  const send = this.options.fetcher ?? fetch;
204
266
  const headers = { "x-goog-api-key": this.options.key, "content-type": "application/json" };
205
- const model = this.options.model ?? "veo-3.1-fast-generate-preview";
206
267
  const started = await send(`${BASE}/models/${model}:predictLongRunning`, {
207
268
  method: "POST",
208
269
  headers,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nixamp",
3
- "version": "0.77.0",
3
+ "version": "0.78.1",
4
4
  "description": "It really whips the terminal's ass. A Winamp-shaped audio player for your terminal.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -46,23 +46,24 @@
46
46
  },
47
47
  "dependencies": {
48
48
  "@profullstack/auth-system": "^0.8.3",
49
- "@profullstack/hqtui": "^0.5.0",
49
+ "@profullstack/group-call": "^0.1.0",
50
+ "@profullstack/hqtui": "^0.11.1",
50
51
  "@profullstack/live-translate": "^0.3.0",
51
- "@profullstack/notifications": "^0.1.0",
52
- "@profullstack/profile": "0.1.3",
53
- "@profullstack/synconfig": "^0.1.2",
54
- "@profullstack/throttle": "^0.3.3",
55
- "@profullstack/x402-gateway": "^0.11.0",
52
+ "@profullstack/notifications": "^0.1.4",
53
+ "@profullstack/profile": "0.1.6",
54
+ "@profullstack/synconfig": "^0.1.3",
55
+ "@profullstack/throttle": "^0.3.4",
56
+ "@profullstack/x402-gateway": "^0.13.1",
56
57
  "acme-client": "5.4.0",
57
- "pg": "^8.23.0"
58
+ "pg": "^8.23.1"
58
59
  },
59
60
  "optionalDependencies": {
60
- "@huggingface/transformers": "^4.2.0"
61
+ "@huggingface/transformers": "^4.3.1"
61
62
  },
62
63
  "devDependencies": {
63
- "@types/node": "^26",
64
+ "@types/node": "^26.6.5",
64
65
  "@types/pg": "^8.23.1",
65
- "jsonwebtoken": "^9.0.2",
66
+ "jsonwebtoken": "^9.0.3",
66
67
  "typescript": "^7.0.2"
67
68
  },
68
69
  "trustedDependencies": [
@@ -85,6 +86,6 @@
85
86
  "overrides": {
86
87
  "https-proxy-agent": "7.0.6",
87
88
  "tslib": "2.8.1",
88
- "@profullstack/x402-gateway": "^0.11.0"
89
+ "@profullstack/x402-gateway": "^0.13.1"
89
90
  }
90
91
  }