@nodaro/shared 2.13.0 → 2.14.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.
- package/dist/index.cjs +49 -49
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +49 -49
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/video-analysis-catalog-sync.test.ts +5 -3
- package/src/__tests__/video-analysis-pricing.test.ts +7 -7
- package/src/extra-refs.ts +7 -0
- package/src/model-catalog.ts +28 -28
- package/src/video-analysis-pricing.ts +29 -21
package/package.json
CHANGED
|
@@ -160,9 +160,11 @@ describe("bare video-analysis node-type credit id", () => {
|
|
|
160
160
|
// trued up every tier's judge/refine terms), 355 wrote 2068: the
|
|
161
161
|
// recast shot-craft Stage-1 doctrine (transitions + on-screen text, three
|
|
162
162
|
// required wire fields) grew the analyser's system prompt, moving the
|
|
163
|
-
// plugin's token pin 8_203 -> 8_482,
|
|
164
|
-
// that prompt again, moving the pin 8_482 -> 8_706
|
|
165
|
-
|
|
163
|
+
// plugin's token pin 8_203 -> 8_482, 356 wrote 2071: Stage 1.3 grew
|
|
164
|
+
// that prompt again, moving the pin 8_482 -> 8_706, and 357 wrote 2076:
|
|
165
|
+
// the transition vocabulary v2 doctrine (twelve named values; absent =
|
|
166
|
+
// nothing asserted) grew it once more, moving the pin 8_706 -> 9_082.
|
|
167
|
+
expect(ceiling).toBe(2076)
|
|
166
168
|
})
|
|
167
169
|
|
|
168
170
|
it("the bare id still bounds the default tier at the ceiling bucket", () => {
|
|
@@ -178,12 +178,12 @@ describe("video-audit-pricing", () => {
|
|
|
178
178
|
})
|
|
179
179
|
|
|
180
180
|
it("videoAuditCreditsForBucket: table lookup by resolved bucket + family, snapping a raw duration onto the ladder", () => {
|
|
181
|
-
expect(videoAuditCreditsForBucket(60, false)).toBe(
|
|
182
|
-
expect(videoAuditCreditsForBucket(60, true)).toBe(
|
|
181
|
+
expect(videoAuditCreditsForBucket(60, false)).toBe(215)
|
|
182
|
+
expect(videoAuditCreditsForBucket(60, true)).toBe(396)
|
|
183
183
|
expect(videoAuditCreditsForBucket(180, false)).toBe(290)
|
|
184
|
-
expect(videoAuditCreditsForBucket(360, false)).toBe(
|
|
185
|
-
expect(videoAuditCreditsForBucket(600, false)).toBe(
|
|
186
|
-
expect(videoAuditCreditsForBucket(600, true)).toBe(
|
|
184
|
+
expect(videoAuditCreditsForBucket(360, false)).toBe(663)
|
|
185
|
+
expect(videoAuditCreditsForBucket(600, false)).toBe(1073)
|
|
186
|
+
expect(videoAuditCreditsForBucket(600, true)).toBe(1921)
|
|
187
187
|
// Not just exact ladder values — a raw duration snaps up to its bucket.
|
|
188
188
|
expect(videoAuditCreditsForBucket(70, false)).toBe(VIDEO_AUDIT_BUCKET_CREDITS["video-audit:180s"])
|
|
189
189
|
expect(videoAuditCreditsForBucket(9999, true)).toBe(VIDEO_AUDIT_BUCKET_CREDITS["video-audit:auto:600s"])
|
|
@@ -224,8 +224,8 @@ describe("video-audit-pricing", () => {
|
|
|
224
224
|
// 600s bucket here, same convention as VIDEO_ANALYSIS_BUCKET_CREDITS).
|
|
225
225
|
expect(Object.keys(VIDEO_AUDIT_BUCKET_CREDITS)).toHaveLength(8)
|
|
226
226
|
// Bare-id values quoted in the task/catalog must equal each family's 600s ceiling.
|
|
227
|
-
expect(VIDEO_AUDIT_BUCKET_CREDITS["video-audit:600s"]).toBe(
|
|
228
|
-
expect(VIDEO_AUDIT_BUCKET_CREDITS["video-audit:auto:600s"]).toBe(
|
|
227
|
+
expect(VIDEO_AUDIT_BUCKET_CREDITS["video-audit:600s"]).toBe(1073)
|
|
228
|
+
expect(VIDEO_AUDIT_BUCKET_CREDITS["video-audit:auto:600s"]).toBe(1921)
|
|
229
229
|
})
|
|
230
230
|
|
|
231
231
|
it("auto family = base family + the gemini-3-flash (legacy fast tier) row at the same bucket, exactly — single-source, never hand-added", () => {
|
package/src/extra-refs.ts
CHANGED
|
@@ -38,6 +38,13 @@ import type { ConnectedReference } from "./types.js"
|
|
|
38
38
|
* the backend (which sees node data as `Record<string, unknown>`) can pass
|
|
39
39
|
* raw JSON through `expandExtraRefsToConnectedReferences`. */
|
|
40
40
|
export interface ExtraRefInput {
|
|
41
|
+
/**
|
|
42
|
+
* Stable id of this extra reference, when the row has one. What a
|
|
43
|
+
* `{ref:<id>}` token in the prompt names; passed through to the shared video
|
|
44
|
+
* resolver's slot map by both the canvas and the orchestrator. Absent → the
|
|
45
|
+
* row still numbers normally but cannot be addressed by id.
|
|
46
|
+
*/
|
|
47
|
+
readonly id?: string
|
|
41
48
|
readonly url?: string
|
|
42
49
|
readonly description?: string
|
|
43
50
|
readonly characterSlug?: string
|
package/src/model-catalog.ts
CHANGED
|
@@ -1971,11 +1971,11 @@ const VIDEO_MODELS: Record<string, ModelCatalogEntry> = {
|
|
|
1971
1971
|
description: "Legacy fast-tier analysis model (pre-2026-07). Kept so stored raw-model configs keep running and keep pricing under their own identifier; new fast-tier runs use the current fast model.",
|
|
1972
1972
|
useCases: ["video-analysis", "shot-list", "fast"],
|
|
1973
1973
|
pricing: [
|
|
1974
|
-
{ identifier: "video-analysis:gemini-3-flash", credits:
|
|
1975
|
-
{ identifier: "video-analysis:gemini-3-flash:60s", credits:
|
|
1974
|
+
{ identifier: "video-analysis:gemini-3-flash", credits: 848, note: "10-min ceiling (no duration given)" },
|
|
1975
|
+
{ identifier: "video-analysis:gemini-3-flash:60s", credits: 181 },
|
|
1976
1976
|
{ identifier: "video-analysis:gemini-3-flash:180s", credits: 185 },
|
|
1977
1977
|
{ identifier: "video-analysis:gemini-3-flash:360s", credits: 515 },
|
|
1978
|
-
{ identifier: "video-analysis:gemini-3-flash:600s", credits:
|
|
1978
|
+
{ identifier: "video-analysis:gemini-3-flash:600s", credits: 848, note: "10-min ceiling" },
|
|
1979
1979
|
],
|
|
1980
1980
|
},
|
|
1981
1981
|
"gemini-3.6-flash-video-analysis": {
|
|
@@ -1988,11 +1988,11 @@ const VIDEO_MODELS: Record<string, ModelCatalogEntry> = {
|
|
|
1988
1988
|
description: "Analyze a video into a structured shot list (scenes, camera, audio) — fast, economy tier. Billed per duration bucket.",
|
|
1989
1989
|
useCases: ["video-analysis", "shot-list", "fast"],
|
|
1990
1990
|
pricing: [
|
|
1991
|
-
{ identifier: "video-analysis:gemini-3.6-flash", credits:
|
|
1991
|
+
{ identifier: "video-analysis:gemini-3.6-flash", credits: 992, note: "10-min ceiling (no duration given)" },
|
|
1992
1992
|
{ identifier: "video-analysis:gemini-3.6-flash:60s", credits: 204 },
|
|
1993
|
-
{ identifier: "video-analysis:gemini-3.6-flash:180s", credits:
|
|
1994
|
-
{ identifier: "video-analysis:gemini-3.6-flash:360s", credits:
|
|
1995
|
-
{ identifier: "video-analysis:gemini-3.6-flash:600s", credits:
|
|
1993
|
+
{ identifier: "video-analysis:gemini-3.6-flash:180s", credits: 219 },
|
|
1994
|
+
{ identifier: "video-analysis:gemini-3.6-flash:360s", credits: 602 },
|
|
1995
|
+
{ identifier: "video-analysis:gemini-3.6-flash:600s", credits: 992, note: "10-min ceiling" },
|
|
1996
1996
|
],
|
|
1997
1997
|
},
|
|
1998
1998
|
"gemini-3.1-pro-video-analysis": {
|
|
@@ -2005,11 +2005,11 @@ const VIDEO_MODELS: Record<string, ModelCatalogEntry> = {
|
|
|
2005
2005
|
description: "Analyze a video into a structured shot list (scenes, camera, audio) — higher-fidelity, default tier. Billed per duration bucket.",
|
|
2006
2006
|
useCases: ["video-analysis", "shot-list", "cinematic"],
|
|
2007
2007
|
pricing: [
|
|
2008
|
-
{ identifier: "video-analysis:gemini-3.1-pro", credits:
|
|
2008
|
+
{ identifier: "video-analysis:gemini-3.1-pro", credits: 1056, note: "10-min ceiling (no duration given)" },
|
|
2009
2009
|
{ identifier: "video-analysis:gemini-3.1-pro:60s", credits: 216 },
|
|
2010
2010
|
{ identifier: "video-analysis:gemini-3.1-pro:180s", credits: 232 },
|
|
2011
|
-
{ identifier: "video-analysis:gemini-3.1-pro:360s", credits:
|
|
2012
|
-
{ identifier: "video-analysis:gemini-3.1-pro:600s", credits:
|
|
2011
|
+
{ identifier: "video-analysis:gemini-3.1-pro:360s", credits: 640 },
|
|
2012
|
+
{ identifier: "video-analysis:gemini-3.1-pro:600s", credits: 1056, note: "10-min ceiling" },
|
|
2013
2013
|
],
|
|
2014
2014
|
},
|
|
2015
2015
|
// Both mixed tiers are variants of the same advanced multi-engine analysis
|
|
@@ -2025,11 +2025,11 @@ const VIDEO_MODELS: Record<string, ModelCatalogEntry> = {
|
|
|
2025
2025
|
description: "Our most advanced analysis tier — multiple analysis engines combined into one result for maximum completeness and accuracy. Billed per duration bucket.",
|
|
2026
2026
|
useCases: ["video-analysis", "shot-list", "premium", "most-complete"],
|
|
2027
2027
|
pricing: [
|
|
2028
|
-
{ identifier: "video-analysis:mixed", credits:
|
|
2029
|
-
{ identifier: "video-analysis:mixed:60s", credits:
|
|
2030
|
-
{ identifier: "video-analysis:mixed:180s", credits:
|
|
2031
|
-
{ identifier: "video-analysis:mixed:360s", credits:
|
|
2032
|
-
{ identifier: "video-analysis:mixed:600s", credits:
|
|
2028
|
+
{ identifier: "video-analysis:mixed", credits: 1177, note: "10-min ceiling (no duration given)" },
|
|
2029
|
+
{ identifier: "video-analysis:mixed:60s", credits: 270 },
|
|
2030
|
+
{ identifier: "video-analysis:mixed:180s", credits: 291 },
|
|
2031
|
+
{ identifier: "video-analysis:mixed:360s", credits: 729 },
|
|
2032
|
+
{ identifier: "video-analysis:mixed:600s", credits: 1177, note: "10-min ceiling" },
|
|
2033
2033
|
],
|
|
2034
2034
|
},
|
|
2035
2035
|
// SMART — the accuracy tier. Since the 2026-08-03 hybrid re-plan it is a
|
|
@@ -2047,11 +2047,11 @@ const VIDEO_MODELS: Record<string, ModelCatalogEntry> = {
|
|
|
2047
2047
|
description: "Highest-accuracy analysis — a hybrid pass that blends a native skeleton read with several donor analysis rolls, then always refines the merged result to find shot boundaries and identify the cast by appearance. Best choice when the shot list will drive regeneration. Billed per duration bucket.",
|
|
2048
2048
|
useCases: ["video-analysis", "shot-list", "premium", "most-accurate"],
|
|
2049
2049
|
pricing: [
|
|
2050
|
-
{ identifier: "video-analysis:smart", credits:
|
|
2051
|
-
{ identifier: "video-analysis:smart:60s", credits:
|
|
2052
|
-
{ identifier: "video-analysis:smart:180s", credits:
|
|
2053
|
-
{ identifier: "video-analysis:smart:360s", credits:
|
|
2054
|
-
{ identifier: "video-analysis:smart:600s", credits:
|
|
2050
|
+
{ identifier: "video-analysis:smart", credits: 2076, note: "10-min ceiling (no duration given)" },
|
|
2051
|
+
{ identifier: "video-analysis:smart:60s", credits: 413 },
|
|
2052
|
+
{ identifier: "video-analysis:smart:180s", credits: 503 },
|
|
2053
|
+
{ identifier: "video-analysis:smart:360s", credits: 1267 },
|
|
2054
|
+
{ identifier: "video-analysis:smart:600s", credits: 2076, note: "10-min ceiling" },
|
|
2055
2055
|
],
|
|
2056
2056
|
},
|
|
2057
2057
|
// ── AI Audit (`video-audit`) ── a SEPARATE node from video-analysis (own
|
|
@@ -2075,11 +2075,11 @@ const VIDEO_MODELS: Record<string, ModelCatalogEntry> = {
|
|
|
2075
2075
|
description: "Re-watches a clip against a wired analysis, applies video-verified corrections under guards, and returns a disclosed report of what changed. Billed per duration bucket.",
|
|
2076
2076
|
useCases: ["video-audit", "qa", "shot-list", "verification"],
|
|
2077
2077
|
pricing: [
|
|
2078
|
-
{ identifier: "video-audit", credits:
|
|
2079
|
-
{ identifier: "video-audit:60s", credits:
|
|
2078
|
+
{ identifier: "video-audit", credits: 1073, note: "10-min ceiling (no duration given)" },
|
|
2079
|
+
{ identifier: "video-audit:60s", credits: 215 },
|
|
2080
2080
|
{ identifier: "video-audit:180s", credits: 290 },
|
|
2081
|
-
{ identifier: "video-audit:360s", credits:
|
|
2082
|
-
{ identifier: "video-audit:600s", credits:
|
|
2081
|
+
{ identifier: "video-audit:360s", credits: 663 },
|
|
2082
|
+
{ identifier: "video-audit:600s", credits: 1073, note: "10-min ceiling" },
|
|
2083
2083
|
],
|
|
2084
2084
|
},
|
|
2085
2085
|
"video-audit-auto": {
|
|
@@ -2091,11 +2091,11 @@ const VIDEO_MODELS: Record<string, ModelCatalogEntry> = {
|
|
|
2091
2091
|
description: "Same video-verified audit as AI Audit, but auto-runs a fast analysis first when none is wired in, then applies corrections under guards and returns a disclosed report. Billed per duration bucket.",
|
|
2092
2092
|
useCases: ["video-audit", "qa", "shot-list", "verification", "auto-analysis"],
|
|
2093
2093
|
pricing: [
|
|
2094
|
-
{ identifier: "video-audit:auto", credits:
|
|
2095
|
-
{ identifier: "video-audit:auto:60s", credits:
|
|
2094
|
+
{ identifier: "video-audit:auto", credits: 1921, note: "10-min ceiling (no duration given)" },
|
|
2095
|
+
{ identifier: "video-audit:auto:60s", credits: 396 },
|
|
2096
2096
|
{ identifier: "video-audit:auto:180s", credits: 475 },
|
|
2097
|
-
{ identifier: "video-audit:auto:360s", credits:
|
|
2098
|
-
{ identifier: "video-audit:auto:600s", credits:
|
|
2097
|
+
{ identifier: "video-audit:auto:360s", credits: 1178 },
|
|
2098
|
+
{ identifier: "video-audit:auto:600s", credits: 1921, note: "10-min ceiling" },
|
|
2099
2099
|
],
|
|
2100
2100
|
},
|
|
2101
2101
|
}
|
|
@@ -97,39 +97,47 @@ export const VIDEO_ANALYSIS_WINDOW = { LEN: WINDOW_LEN, STRIDE: WINDOW_STRIDE, O
|
|
|
97
97
|
// (cloud-plugins 0.209.0). 12 of 20 analysis rows and 6 of 8 audit rows tick up
|
|
98
98
|
// by 1–3 credits (~0.1–0.3%); the legacy `gemini-3-flash` family is unchanged.
|
|
99
99
|
// Output of the plugin's `scripts/gen-va-buckets.mjs`, pasted verbatim.
|
|
100
|
+
//
|
|
101
|
+
// REGENERATED 2026-08-30 — transition vocabulary v2: the analyser's doctrine now
|
|
102
|
+
// DEFINES twelve named transition values (and says an absent transition asserts
|
|
103
|
+
// nothing), which grew the analyser's system prompt once more — the plugin's
|
|
104
|
+
// system-prompt token pin moved 8_706 → 9_082 (cloud-plugins 0.212.0). 15 of 20
|
|
105
|
+
// analysis rows and 6 of 8 audit rows tick up by 1–5 credits (~0.1–0.6%); unlike
|
|
106
|
+
// the 8_482 → 8_706 round, the legacy `gemini-3-flash` family moves too.
|
|
107
|
+
// Output of the plugin's `scripts/gen-va-buckets.mjs`, pasted verbatim.
|
|
100
108
|
export const VIDEO_ANALYSIS_BUCKET_CREDITS: Record<string, number> = {
|
|
101
109
|
// Legacy fast-tier model (pre-2026-07) — kept for stored raw-id configs.
|
|
102
|
-
"video-analysis:gemini-3-flash:60s":
|
|
110
|
+
"video-analysis:gemini-3-flash:60s": 181,
|
|
103
111
|
"video-analysis:gemini-3-flash:180s": 185,
|
|
104
112
|
"video-analysis:gemini-3-flash:360s": 515,
|
|
105
|
-
"video-analysis:gemini-3-flash:600s":
|
|
113
|
+
"video-analysis:gemini-3-flash:600s": 848,
|
|
106
114
|
// Current fast tier — regenerated from the private formula for its backing
|
|
107
115
|
// model; higher than the legacy fast schedule but still ≤ pro per bucket.
|
|
108
116
|
"video-analysis:gemini-3.6-flash:60s": 204,
|
|
109
|
-
"video-analysis:gemini-3.6-flash:180s":
|
|
110
|
-
"video-analysis:gemini-3.6-flash:360s":
|
|
111
|
-
"video-analysis:gemini-3.6-flash:600s":
|
|
117
|
+
"video-analysis:gemini-3.6-flash:180s": 219,
|
|
118
|
+
"video-analysis:gemini-3.6-flash:360s": 602,
|
|
119
|
+
"video-analysis:gemini-3.6-flash:600s": 992,
|
|
112
120
|
"video-analysis:gemini-3.1-pro:60s": 216,
|
|
113
121
|
"video-analysis:gemini-3.1-pro:180s": 232,
|
|
114
|
-
"video-analysis:gemini-3.1-pro:360s":
|
|
115
|
-
"video-analysis:gemini-3.1-pro:600s":
|
|
122
|
+
"video-analysis:gemini-3.1-pro:360s": 640,
|
|
123
|
+
"video-analysis:gemini-3.1-pro:600s": 1056,
|
|
116
124
|
// Mixed tiers (`mixed` + `mixed-fast`) share ONE credit family — they are
|
|
117
125
|
// variants of the same engine plan (plan internals live in the private
|
|
118
126
|
// analysis plugin). Admin-tunable via model_pricing like every other row.
|
|
119
|
-
"video-analysis:mixed:60s":
|
|
120
|
-
"video-analysis:mixed:180s":
|
|
121
|
-
"video-analysis:mixed:360s":
|
|
122
|
-
"video-analysis:mixed:600s":
|
|
127
|
+
"video-analysis:mixed:60s": 270,
|
|
128
|
+
"video-analysis:mixed:180s": 291,
|
|
129
|
+
"video-analysis:mixed:360s": 729,
|
|
130
|
+
"video-analysis:mixed:600s": 1177,
|
|
123
131
|
// SMART — the accuracy tier, and since the 2026-08-03 re-plan a multi-roll
|
|
124
132
|
// plan like the others, always refined (`selectionMode` does not apply
|
|
125
133
|
// here — smart always refines; it never offers a cheaper "choose" path).
|
|
126
134
|
// Priced above the economy tiers because it genuinely costs more to run;
|
|
127
135
|
// the only tier whose accuracy is validated against a hand-counted edit
|
|
128
136
|
// list, re-validated at the current plan before this schedule shipped.
|
|
129
|
-
"video-analysis:smart:60s":
|
|
130
|
-
"video-analysis:smart:180s":
|
|
131
|
-
"video-analysis:smart:360s":
|
|
132
|
-
"video-analysis:smart:600s":
|
|
137
|
+
"video-analysis:smart:60s": 413,
|
|
138
|
+
"video-analysis:smart:180s": 503,
|
|
139
|
+
"video-analysis:smart:360s": 1267,
|
|
140
|
+
"video-analysis:smart:600s": 2076,
|
|
133
141
|
}
|
|
134
142
|
|
|
135
143
|
/**
|
|
@@ -199,14 +207,14 @@ export function videoAnalysisNumWindows(bucketSec: number): number {
|
|
|
199
207
|
* never hand computed. The plugin's cost test cross-checks every row.
|
|
200
208
|
*/
|
|
201
209
|
export const VIDEO_AUDIT_BUCKET_CREDITS: Record<string, number> = {
|
|
202
|
-
"video-audit:60s":
|
|
210
|
+
"video-audit:60s": 215,
|
|
203
211
|
"video-audit:180s": 290,
|
|
204
|
-
"video-audit:360s":
|
|
205
|
-
"video-audit:600s":
|
|
206
|
-
"video-audit:auto:60s":
|
|
212
|
+
"video-audit:360s": 663,
|
|
213
|
+
"video-audit:600s": 1073,
|
|
214
|
+
"video-audit:auto:60s": 396,
|
|
207
215
|
"video-audit:auto:180s": 475,
|
|
208
|
-
"video-audit:auto:360s":
|
|
209
|
-
"video-audit:auto:600s":
|
|
216
|
+
"video-audit:auto:360s": 1178,
|
|
217
|
+
"video-audit:auto:600s": 1921,
|
|
210
218
|
}
|
|
211
219
|
|
|
212
220
|
/**
|