@nodaro/shared 3.25.0 → 3.27.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 +778 -169
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +427 -75
- package/dist/index.d.ts +427 -75
- package/dist/index.js +749 -170
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/__tests__/auto-aspect-source.test.ts +372 -0
- package/src/__tests__/camera-switch-contract.test.ts +10 -0
- package/src/__tests__/collections.test.ts +10 -0
- package/src/__tests__/condition-variables.test.ts +12 -0
- package/src/__tests__/content-recipe-ideas.test.ts +9 -4
- package/src/__tests__/credit-identifiers.test.ts +12 -0
- package/src/__tests__/edl.test.ts +319 -4
- package/src/__tests__/image-model-roles.test.ts +57 -0
- package/src/__tests__/image-ref-limit.test.ts +1 -0
- package/src/__tests__/json-kinds.test.ts +11 -1
- package/src/__tests__/llm-models.test.ts +253 -42
- package/src/__tests__/lone-media-url.test.ts +78 -0
- package/src/__tests__/prompt-length-limits.test.ts +2 -0
- package/src/__tests__/render-nodes.test.ts +46 -1
- package/src/__tests__/transcribe-preflight.test.ts +5 -0
- package/src/camera-switch-contract.ts +9 -6
- package/src/collections.ts +72 -2
- package/src/condition-variables.ts +3 -1
- package/src/content-recipe-ideas.ts +5 -2
- package/src/credit-identifiers.ts +56 -13
- package/src/edl.ts +143 -23
- package/src/fan-out-rows.ts +1 -1
- package/src/i18n/camera-format.ko.ts +3 -3
- package/src/image-model-roles.ts +62 -0
- package/src/index.ts +42 -0
- package/src/json-kinds.ts +11 -6
- package/src/llm-models.ts +434 -24
- package/src/lone-media-url.ts +57 -0
- package/src/model-catalog.ts +145 -9
- package/src/model-constants.ts +13 -2
- package/src/node-default-mappings.ts +3 -0
- package/src/node-runtime-keys.ts +3 -0
- package/src/normalize-node-params.ts +47 -4
- package/src/pipeline-types.ts +16 -3
- package/src/producer-types.ts +4 -0
- package/src/render-nodes.ts +58 -2
- package/src/settings-input.ts +2 -1
- package/src/transcribe-preflight.ts +11 -10
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
transcribeLaneSupportsWordTimestamps,
|
|
4
4
|
transcribeProvidersWithWordTimestamps,
|
|
5
5
|
} from "./model-constants.js"
|
|
6
|
-
import {
|
|
6
|
+
import { renderTranscriptOutputOf } from "./render-nodes.js"
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Pre-run checks for the transcribe → captions chain.
|
|
@@ -47,14 +47,12 @@ export interface WordlessTranscriptFeed {
|
|
|
47
47
|
// Handle ids (generated map: backend/src/lib/mcp/generated/node-handles.ts).
|
|
48
48
|
const TRANSCRIBE_JSON_OUT = "json"
|
|
49
49
|
const TRANSCRIPT_IN = "transcript"
|
|
50
|
-
/** A render's `json` output — handed on as a Transcript only by a render whose
|
|
51
|
-
* `jsonKind` is `transcript` (Apply EDL's is; an EDL-emitting render's is not). */
|
|
52
|
-
const RENDER_JSON_OUT = "json"
|
|
53
50
|
|
|
54
51
|
/**
|
|
55
52
|
* Every transcribe node on a word-INCAPABLE lane whose `json` output reaches an
|
|
56
53
|
* add-captions `transcript` input — directly, or through apply-edl, which remaps
|
|
57
|
-
* the transcript and re-emits it on its own `json` handle
|
|
54
|
+
* the transcript and re-emits it on its own `json` handle (or any render, by
|
|
55
|
+
* its registry `transcriptOutput`: Speaker View's `transcript`). add-captions rejects a
|
|
58
56
|
* transcript with no words, so such a run can only fail, after paying for the
|
|
59
57
|
* transcription. Skipped nodes are ignored on both ends.
|
|
60
58
|
*
|
|
@@ -77,8 +75,8 @@ export function findWordlessTranscriptFeeds(
|
|
|
77
75
|
const refusal = transcribeWordTimestampsRefusal(provider)
|
|
78
76
|
if (!refusal) continue
|
|
79
77
|
|
|
80
|
-
// Walk the transcript's path: transcribe.json → [render.transcript →
|
|
81
|
-
//
|
|
78
|
+
// Walk the transcript's path: transcribe.json → [render.transcript → its transcript output]* → add-captions.transcript,
|
|
79
|
+
// out of every render on the pip its registry names (RENDER_NODE_TYPES transcriptOutput)
|
|
82
80
|
const seen = new Set<string>()
|
|
83
81
|
const frontier: Array<{ id: string; outHandle: string }> = [{ id: node.id, outHandle: TRANSCRIBE_JSON_OUT }]
|
|
84
82
|
while (frontier.length > 0) {
|
|
@@ -94,9 +92,12 @@ export function findWordlessTranscriptFeeds(
|
|
|
94
92
|
provider,
|
|
95
93
|
message: `Captions need word timings, but ${refusal}.`,
|
|
96
94
|
})
|
|
97
|
-
} else if (
|
|
98
|
-
|
|
99
|
-
|
|
95
|
+
} else if (!seen.has(target!.id)) {
|
|
96
|
+
const remapped = renderTranscriptOutputOf(target!.type)
|
|
97
|
+
if (remapped) {
|
|
98
|
+
seen.add(target!.id)
|
|
99
|
+
frontier.push({ id: target!.id, outHandle: remapped.handle })
|
|
100
|
+
}
|
|
100
101
|
}
|
|
101
102
|
}
|
|
102
103
|
}
|