@nodaro/shared 2.12.1 → 2.12.2

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nodaro/shared",
3
- "version": "2.12.1",
3
+ "version": "2.12.2",
4
4
  "description": "Shared types, model catalog, wire contracts, and structural vocabularies for the Nodaro platform and SDK.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -157,8 +157,12 @@ describe("bare video-analysis node-type credit id", () => {
157
157
  // 24 and the schedule regenerated ~47% lower at the ceiling bucket, and 300
158
158
  // wrote 2064: the V1 hybrid-smart reprice (task A3) moved `smart` to a
159
159
  // multi-roll plan (native skeleton + donor rolls, always refined) and
160
- // trued up every tier's judge/refine terms).
161
- expect(ceiling).toBe(2064)
160
+ // trued up every tier's judge/refine terms), 355 wrote 2068: the
161
+ // recast shot-craft Stage-1 doctrine (transitions + on-screen text, three
162
+ // required wire fields) grew the analyser's system prompt, moving the
163
+ // plugin's token pin 8_203 -> 8_482, and 356 wrote 2071: Stage 1.3 grew
164
+ // that prompt again, moving the pin 8_482 -> 8_706.
165
+ expect(ceiling).toBe(2071)
162
166
  })
163
167
 
164
168
  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(213)
182
- expect(videoAuditCreditsForBucket(60, true)).toBe(393)
183
- expect(videoAuditCreditsForBucket(180, false)).toBe(289)
184
- expect(videoAuditCreditsForBucket(360, false)).toBe(659)
185
- expect(videoAuditCreditsForBucket(600, false)).toBe(1066)
186
- expect(videoAuditCreditsForBucket(600, true)).toBe(1912)
181
+ expect(videoAuditCreditsForBucket(60, false)).toBe(214)
182
+ expect(videoAuditCreditsForBucket(60, true)).toBe(394)
183
+ expect(videoAuditCreditsForBucket(180, false)).toBe(290)
184
+ expect(videoAuditCreditsForBucket(360, false)).toBe(661)
185
+ expect(videoAuditCreditsForBucket(600, false)).toBe(1070)
186
+ expect(videoAuditCreditsForBucket(600, true)).toBe(1917)
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(1066)
228
- expect(VIDEO_AUDIT_BUCKET_CREDITS["video-audit:auto:600s"]).toBe(1912)
227
+ expect(VIDEO_AUDIT_BUCKET_CREDITS["video-audit:600s"]).toBe(1070)
228
+ expect(VIDEO_AUDIT_BUCKET_CREDITS["video-audit:auto:600s"]).toBe(1917)
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", () => {
@@ -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: 846, note: "10-min ceiling (no duration given)" },
1974
+ { identifier: "video-analysis:gemini-3-flash", credits: 847, note: "10-min ceiling (no duration given)" },
1975
1975
  { identifier: "video-analysis:gemini-3-flash:60s", credits: 180 },
1976
1976
  { identifier: "video-analysis:gemini-3-flash:180s", credits: 185 },
1977
- { identifier: "video-analysis:gemini-3-flash:360s", credits: 514 },
1978
- { identifier: "video-analysis:gemini-3-flash:600s", credits: 846, note: "10-min ceiling" },
1977
+ { identifier: "video-analysis:gemini-3-flash:360s", credits: 515 },
1978
+ { identifier: "video-analysis:gemini-3-flash:600s", credits: 847, 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: 986, note: "10-min ceiling (no duration given)" },
1992
- { identifier: "video-analysis:gemini-3.6-flash:60s", credits: 203 },
1991
+ { identifier: "video-analysis:gemini-3.6-flash", credits: 990, note: "10-min ceiling (no duration given)" },
1992
+ { identifier: "video-analysis:gemini-3.6-flash:60s", credits: 204 },
1993
1993
  { identifier: "video-analysis:gemini-3.6-flash:180s", credits: 218 },
1994
- { identifier: "video-analysis:gemini-3.6-flash:360s", credits: 598 },
1995
- { identifier: "video-analysis:gemini-3.6-flash:600s", credits: 986, note: "10-min ceiling" },
1994
+ { identifier: "video-analysis:gemini-3.6-flash:360s", credits: 600 },
1995
+ { identifier: "video-analysis:gemini-3.6-flash:600s", credits: 990, 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: 1050, note: "10-min ceiling (no duration given)" },
2009
- { identifier: "video-analysis:gemini-3.1-pro:60s", credits: 215 },
2010
- { identifier: "video-analysis:gemini-3.1-pro:180s", credits: 231 },
2011
- { identifier: "video-analysis:gemini-3.1-pro:360s", credits: 636 },
2012
- { identifier: "video-analysis:gemini-3.1-pro:600s", credits: 1050, note: "10-min ceiling" },
2008
+ { identifier: "video-analysis:gemini-3.1-pro", credits: 1053, note: "10-min ceiling (no duration given)" },
2009
+ { identifier: "video-analysis:gemini-3.1-pro:60s", credits: 216 },
2010
+ { identifier: "video-analysis:gemini-3.1-pro:180s", credits: 232 },
2011
+ { identifier: "video-analysis:gemini-3.1-pro:360s", credits: 639 },
2012
+ { identifier: "video-analysis:gemini-3.1-pro:600s", credits: 1053, 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: 1169, note: "10-min ceiling (no duration given)" },
2029
- { identifier: "video-analysis:mixed:60s", credits: 268 },
2030
- { identifier: "video-analysis:mixed:180s", credits: 289 },
2031
- { identifier: "video-analysis:mixed:360s", credits: 724 },
2032
- { identifier: "video-analysis:mixed:600s", credits: 1169, note: "10-min ceiling" },
2028
+ { identifier: "video-analysis:mixed", credits: 1174, note: "10-min ceiling (no duration given)" },
2029
+ { identifier: "video-analysis:mixed:60s", credits: 269 },
2030
+ { identifier: "video-analysis:mixed:180s", credits: 290 },
2031
+ { identifier: "video-analysis:mixed:360s", credits: 727 },
2032
+ { identifier: "video-analysis:mixed:600s", credits: 1174, 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: 2064, note: "10-min ceiling (no duration given)" },
2051
- { identifier: "video-analysis:smart:60s", credits: 410 },
2052
- { identifier: "video-analysis:smart:180s", credits: 500 },
2053
- { identifier: "video-analysis:smart:360s", credits: 1259 },
2054
- { identifier: "video-analysis:smart:600s", credits: 2064, note: "10-min ceiling" },
2050
+ { identifier: "video-analysis:smart", credits: 2071, note: "10-min ceiling (no duration given)" },
2051
+ { identifier: "video-analysis:smart:60s", credits: 412 },
2052
+ { identifier: "video-analysis:smart:180s", credits: 502 },
2053
+ { identifier: "video-analysis:smart:360s", credits: 1264 },
2054
+ { identifier: "video-analysis:smart:600s", credits: 2071, 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: 1066, note: "10-min ceiling (no duration given)" },
2079
- { identifier: "video-audit:60s", credits: 213 },
2080
- { identifier: "video-audit:180s", credits: 289 },
2081
- { identifier: "video-audit:360s", credits: 659 },
2082
- { identifier: "video-audit:600s", credits: 1066, note: "10-min ceiling" },
2078
+ { identifier: "video-audit", credits: 1070, note: "10-min ceiling (no duration given)" },
2079
+ { identifier: "video-audit:60s", credits: 214 },
2080
+ { identifier: "video-audit:180s", credits: 290 },
2081
+ { identifier: "video-audit:360s", credits: 661 },
2082
+ { identifier: "video-audit:600s", credits: 1070, 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: 1912, note: "10-min ceiling (no duration given)" },
2095
- { identifier: "video-audit:auto:60s", credits: 393 },
2096
- { identifier: "video-audit:auto:180s", credits: 474 },
2097
- { identifier: "video-audit:auto:360s", credits: 1173 },
2098
- { identifier: "video-audit:auto:600s", credits: 1912, note: "10-min ceiling" },
2094
+ { identifier: "video-audit:auto", credits: 1917, note: "10-min ceiling (no duration given)" },
2095
+ { identifier: "video-audit:auto:60s", credits: 394 },
2096
+ { identifier: "video-audit:auto:180s", credits: 475 },
2097
+ { identifier: "video-audit:auto:360s", credits: 1176 },
2098
+ { identifier: "video-audit:auto:600s", credits: 1917, note: "10-min ceiling" },
2099
2099
  ],
2100
2100
  },
2101
2101
  }
@@ -86,39 +86,50 @@ export const VIDEO_ANALYSIS_WINDOW = { LEN: WINDOW_LEN, STRIDE: WINDOW_STRIDE, O
86
86
  //
87
87
  // Values are pasted verbatim from the plugin generator's output — never hand
88
88
  // computed. The plugin's cost test cross-checks every row, sentinels included.
89
+ // REGENERATED 2026-08-28 — recast shot-craft Stage 1: the analyser's system
90
+ // prompt grew (transition/on-screen-text doctrine + three required wire
91
+ // fields), so the plugin's system-prompt token pin moved 8_203 → 8_482 and
92
+ // 21 of 28 rows tick up by 1–4 credits (~0.1–0.3%). Output of the plugin's
93
+ // `scripts/gen-va-buckets.mjs` on `feat/va-shot-craft`, pasted verbatim.
94
+ //
95
+ // REGENERATED 2026-08-29 — recast shot-craft Stage 1.3: the analyser's system
96
+ // prompt grew again, moving the plugin's system-prompt token pin 8_482 → 8_706
97
+ // (cloud-plugins 0.209.0). 12 of 20 analysis rows and 6 of 8 audit rows tick up
98
+ // by 1–3 credits (~0.1–0.3%); the legacy `gemini-3-flash` family is unchanged.
99
+ // Output of the plugin's `scripts/gen-va-buckets.mjs`, pasted verbatim.
89
100
  export const VIDEO_ANALYSIS_BUCKET_CREDITS: Record<string, number> = {
90
101
  // Legacy fast-tier model (pre-2026-07) — kept for stored raw-id configs.
91
102
  "video-analysis:gemini-3-flash:60s": 180,
92
103
  "video-analysis:gemini-3-flash:180s": 185,
93
- "video-analysis:gemini-3-flash:360s": 514,
94
- "video-analysis:gemini-3-flash:600s": 846,
104
+ "video-analysis:gemini-3-flash:360s": 515,
105
+ "video-analysis:gemini-3-flash:600s": 847,
95
106
  // Current fast tier — regenerated from the private formula for its backing
96
107
  // model; higher than the legacy fast schedule but still ≤ pro per bucket.
97
- "video-analysis:gemini-3.6-flash:60s": 203,
108
+ "video-analysis:gemini-3.6-flash:60s": 204,
98
109
  "video-analysis:gemini-3.6-flash:180s": 218,
99
- "video-analysis:gemini-3.6-flash:360s": 598,
100
- "video-analysis:gemini-3.6-flash:600s": 986,
101
- "video-analysis:gemini-3.1-pro:60s": 215,
102
- "video-analysis:gemini-3.1-pro:180s": 231,
103
- "video-analysis:gemini-3.1-pro:360s": 636,
104
- "video-analysis:gemini-3.1-pro:600s": 1050,
110
+ "video-analysis:gemini-3.6-flash:360s": 600,
111
+ "video-analysis:gemini-3.6-flash:600s": 990,
112
+ "video-analysis:gemini-3.1-pro:60s": 216,
113
+ "video-analysis:gemini-3.1-pro:180s": 232,
114
+ "video-analysis:gemini-3.1-pro:360s": 639,
115
+ "video-analysis:gemini-3.1-pro:600s": 1053,
105
116
  // Mixed tiers (`mixed` + `mixed-fast`) share ONE credit family — they are
106
117
  // variants of the same engine plan (plan internals live in the private
107
118
  // analysis plugin). Admin-tunable via model_pricing like every other row.
108
- "video-analysis:mixed:60s": 268,
109
- "video-analysis:mixed:180s": 289,
110
- "video-analysis:mixed:360s": 724,
111
- "video-analysis:mixed:600s": 1169,
119
+ "video-analysis:mixed:60s": 269,
120
+ "video-analysis:mixed:180s": 290,
121
+ "video-analysis:mixed:360s": 727,
122
+ "video-analysis:mixed:600s": 1174,
112
123
  // SMART — the accuracy tier, and since the 2026-08-03 re-plan a multi-roll
113
124
  // plan like the others, always refined (`selectionMode` does not apply
114
125
  // here — smart always refines; it never offers a cheaper "choose" path).
115
126
  // Priced above the economy tiers because it genuinely costs more to run;
116
127
  // the only tier whose accuracy is validated against a hand-counted edit
117
128
  // list, re-validated at the current plan before this schedule shipped.
118
- "video-analysis:smart:60s": 410,
119
- "video-analysis:smart:180s": 500,
120
- "video-analysis:smart:360s": 1259,
121
- "video-analysis:smart:600s": 2064,
129
+ "video-analysis:smart:60s": 412,
130
+ "video-analysis:smart:180s": 502,
131
+ "video-analysis:smart:360s": 1264,
132
+ "video-analysis:smart:600s": 2071,
122
133
  }
123
134
 
124
135
  /**
@@ -188,14 +199,14 @@ export function videoAnalysisNumWindows(bucketSec: number): number {
188
199
  * never hand computed. The plugin's cost test cross-checks every row.
189
200
  */
190
201
  export const VIDEO_AUDIT_BUCKET_CREDITS: Record<string, number> = {
191
- "video-audit:60s": 213,
192
- "video-audit:180s": 289,
193
- "video-audit:360s": 659,
194
- "video-audit:600s": 1066,
195
- "video-audit:auto:60s": 393,
196
- "video-audit:auto:180s": 474,
197
- "video-audit:auto:360s": 1173,
198
- "video-audit:auto:600s": 1912,
202
+ "video-audit:60s": 214,
203
+ "video-audit:180s": 290,
204
+ "video-audit:360s": 661,
205
+ "video-audit:600s": 1070,
206
+ "video-audit:auto:60s": 394,
207
+ "video-audit:auto:180s": 475,
208
+ "video-audit:auto:360s": 1176,
209
+ "video-audit:auto:600s": 1917,
199
210
  }
200
211
 
201
212
  /**