@ossclip/core 0.1.5 → 0.1.6

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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/config.ts +11 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ossclip/core",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "description": "ossclip's framework-free pipeline: schema, transcription, analysis, cutlist, captions, framing, and the LLM producer",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/config.ts CHANGED
@@ -4,6 +4,9 @@ import { join } from "node:path";
4
4
 
5
5
  import type { ModelPrice } from "./producer/usage";
6
6
 
7
+ /** Whether a finished `produce` offers to open the editor. */
8
+ export type OpenEditorPref = "ask" | "always" | "never";
9
+
7
10
  export interface OssclipConfig {
8
11
  ffmpegPath: string;
9
12
  ffprobePath: string;
@@ -21,6 +24,12 @@ export interface OssclipConfig {
21
24
  * a plausible one, and stops grounding flagging the speaker's own name.
22
25
  */
23
26
  speaker?: string;
27
+ /**
28
+ * What a finished produce run does about the editor: ask (default), always
29
+ * open, or never mention it. Written by the post-produce prompt when the
30
+ * user picks one of its "stop asking" answers.
31
+ */
32
+ openEditorAfterProduce?: OpenEditorPref;
24
33
  browserExecutable?: string;
25
34
  /**
26
35
  * USD per million tokens, keyed by model id or family substring — overrides
@@ -96,6 +105,8 @@ export function loadConfig(): OssclipConfig {
96
105
  model: process.env.OSSCLIP_MODEL ?? fileCfg.model ?? DEFAULTS.model,
97
106
  fastModel: process.env.OSSCLIP_FAST_MODEL ?? fileCfg.fastModel,
98
107
  speaker: process.env.OSSCLIP_SPEAKER ?? fileCfg.speaker,
108
+ openEditorAfterProduce: (process.env.OSSCLIP_OPEN_EDITOR ??
109
+ fileCfg.openEditorAfterProduce) as OpenEditorPref | undefined,
99
110
  browserExecutable: process.env.OSSCLIP_BROWSER ?? fileCfg.browserExecutable,
100
111
  pricing: fileCfg.pricing,
101
112
  };