@jiggai/recipes 0.4.48 → 0.4.49

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.
@@ -2,7 +2,7 @@
2
2
  "id": "recipes",
3
3
  "name": "Recipes",
4
4
  "description": "Markdown recipes that scaffold agents and teams (workspace-local).",
5
- "version": "0.4.48",
5
+ "version": "0.4.49",
6
6
  "configSchema": {
7
7
  "type": "object",
8
8
  "additionalProperties": false,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jiggai/recipes",
3
- "version": "0.4.48",
3
+ "version": "0.4.49",
4
4
  "description": "ClawRecipes plugin for OpenClaw (markdown recipes -> scaffold agents/teams)",
5
5
  "main": "index.ts",
6
6
  "type": "commonjs",
@@ -1,5 +1,6 @@
1
1
  import { MediaDriver, MediaDriverInvokeOpts, MediaDriverResult } from './types';
2
- import { findSkillDir, findVenvPython, runScript, parseMediaOutput, findScriptInSkill } from './utils';
2
+ import { findSkillDir, findVenvPython, runScript, parseMediaOutput, findScriptInSkill, loadConfigEnv } from './utils';
3
+ import { loadConfigEnv } from './utils';
3
4
 
4
5
  export class GenericDriver implements MediaDriver {
5
6
  slug: string;
@@ -15,7 +16,8 @@ export class GenericDriver implements MediaDriver {
15
16
  }
16
17
 
17
18
  async invoke(opts: MediaDriverInvokeOpts): Promise<MediaDriverResult> {
18
- const { prompt, outputDir, env, timeout } = opts;
19
+ const { prompt, outputDir, timeout } = opts;
20
+ const env = await loadConfigEnv();
19
21
 
20
22
  // Find the skill directory
21
23
  const skillDir = await findSkillDir(this.slug);
@@ -1,7 +1,7 @@
1
1
  import * as path from 'path';
2
2
  import * as fs from 'fs';
3
3
  import { MediaDriver, MediaDriverInvokeOpts, MediaDriverResult, DurationConstraints, parseDuration } from './types';
4
- import { findSkillDir, runScript, parseMediaOutput } from './utils';
4
+ import { findSkillDir, runScript, parseMediaOutput, loadConfigEnv } from './utils';
5
5
 
6
6
  /**
7
7
  * Map aspect ratios to Kling's supported values: 16:9, 9:16, 1:1
@@ -57,7 +57,8 @@ export class KlingVideo implements MediaDriver {
57
57
  }
58
58
 
59
59
  async invoke(opts: MediaDriverInvokeOpts): Promise<MediaDriverResult> {
60
- const { prompt, outputDir, env, timeout, config } = opts;
60
+ const { prompt, outputDir, timeout, config } = opts;
61
+ const env = await loadConfigEnv();
61
62
  // Kling supports 3-15s; clamp to valid range
62
63
  const rawDuration = Math.max(3, Math.min(15, Number(parseDuration(config))));
63
64
  const duration = String(rawDuration);
@@ -1,6 +1,6 @@
1
1
  import * as path from 'path';
2
2
  import { MediaDriver, MediaDriverInvokeOpts, MediaDriverResult, DurationConstraints, parseDuration } from './types';
3
- import { findSkillDir, findVenvPython, runScript, parseMediaOutput } from './utils';
3
+ import { findSkillDir, findVenvPython, runScript, parseMediaOutput, loadConfigEnv } from './utils';
4
4
 
5
5
  export class LumaVideo implements MediaDriver {
6
6
  slug = 'luma-video';
@@ -10,7 +10,8 @@ export class LumaVideo implements MediaDriver {
10
10
  durationConstraints: DurationConstraints = { minSeconds: 5, maxSeconds: 9, defaultSeconds: 5, stepSeconds: 4 };
11
11
 
12
12
  async invoke(opts: MediaDriverInvokeOpts): Promise<MediaDriverResult> {
13
- const { prompt, outputDir, env, timeout, config } = opts;
13
+ const { prompt, outputDir, timeout, config } = opts;
14
+ const env = await loadConfigEnv();
14
15
  const duration = parseDuration(config);
15
16
 
16
17
  // Find the skill directory
@@ -1,6 +1,7 @@
1
1
  import * as path from 'path';
2
2
  import { MediaDriver, MediaDriverInvokeOpts, MediaDriverResult } from './types';
3
- import { findSkillDir, findVenvPython, runScript } from './utils';
3
+ import { findSkillDir, findVenvPython, runScript, loadConfigEnv } from './utils';
4
+ import { loadConfigEnv } from './utils';
4
5
 
5
6
  export class NanoBananaPro implements MediaDriver {
6
7
  slug = 'nano-banana-pro';
@@ -10,7 +11,8 @@ export class NanoBananaPro implements MediaDriver {
10
11
  durationConstraints = null;
11
12
 
12
13
  async invoke(opts: MediaDriverInvokeOpts): Promise<MediaDriverResult> {
13
- const { prompt, outputDir, env, timeout, config } = opts;
14
+ const { prompt, outputDir, timeout, config } = opts;
15
+ const env = await loadConfigEnv();
14
16
 
15
17
  // Find the skill directory
16
18
  const skillDir = await findSkillDir(this.slug);
@@ -1,6 +1,7 @@
1
1
  import * as path from 'path';
2
2
  import { MediaDriver, MediaDriverInvokeOpts, MediaDriverResult } from './types';
3
- import { findSkillDir, findVenvPython, runScript, parseMediaOutput } from './utils';
3
+ import { findSkillDir, findVenvPython, runScript, parseMediaOutput, loadConfigEnv } from './utils';
4
+ import { loadConfigEnv } from './utils';
4
5
 
5
6
  export class OpenAIImageGen implements MediaDriver {
6
7
  slug = 'openai-image-gen';
@@ -10,7 +11,8 @@ export class OpenAIImageGen implements MediaDriver {
10
11
  durationConstraints = null;
11
12
 
12
13
  async invoke(opts: MediaDriverInvokeOpts): Promise<MediaDriverResult> {
13
- const { prompt, outputDir, env, timeout, config } = opts;
14
+ const { prompt, outputDir, timeout, config } = opts;
15
+ const env = await loadConfigEnv();
14
16
 
15
17
  // Find the skill directory
16
18
  const skillDir = await findSkillDir(this.slug);
@@ -1,6 +1,6 @@
1
1
  import * as path from 'path';
2
2
  import { MediaDriver, MediaDriverInvokeOpts, MediaDriverResult, DurationConstraints, parseDuration } from './types';
3
- import { findSkillDir, findVenvPython, runScript, parseMediaOutput } from './utils';
3
+ import { findSkillDir, findVenvPython, runScript, parseMediaOutput, loadConfigEnv } from './utils';
4
4
 
5
5
  export class RunwayVideo implements MediaDriver {
6
6
  slug = 'runway-video';
@@ -10,7 +10,8 @@ export class RunwayVideo implements MediaDriver {
10
10
  durationConstraints: DurationConstraints = { minSeconds: 5, maxSeconds: 10, defaultSeconds: 10, stepSeconds: 5 };
11
11
 
12
12
  async invoke(opts: MediaDriverInvokeOpts): Promise<MediaDriverResult> {
13
- const { prompt, outputDir, env, timeout, config } = opts;
13
+ const { prompt, outputDir, timeout, config } = opts;
14
+ const env = await loadConfigEnv();
14
15
  const duration = parseDuration(config);
15
16
 
16
17
  // Find the skill directory
@@ -4,7 +4,6 @@ export interface MediaDriverInvokeOpts {
4
4
  api: OpenClawPluginApi;
5
5
  prompt: string;
6
6
  outputDir: string;
7
- env: Record<string, string>;
8
7
  timeout: number;
9
8
  config?: Record<string, unknown>;
10
9
  }
@@ -8,7 +8,6 @@ import { classifyError, errorCategoryLabel } from './workflow-error-classify';
8
8
  import { resolveTeamDir } from '../workspace';
9
9
  import { getDriver } from './media-drivers/registry';
10
10
  import { GenericDriver } from './media-drivers/generic.driver';
11
- import { loadConfigEnv } from './media-drivers/utils';
12
11
  import type { WorkflowLane, WorkflowNode, RunLog } from './workflow-types';
13
12
  import { dequeueNextTask, enqueueTask, releaseTaskClaim, compactQueue } from './workflow-queue';
14
13
  import { loadPriorLlmInput, loadProposedPostTextFromPriorNode } from './workflow-node-output-readers';
@@ -1509,9 +1508,6 @@ export async function runWorkflowWorkerTick(api: OpenClawPluginApi, opts: {
1509
1508
 
1510
1509
  // ── Step 2: Invoke the media driver to generate actual media ─────
1511
1510
  const providerSlug = provider;
1512
- // Load API keys from openclaw.json config (OPENAI_API_KEY, GEMINI_API_KEY, etc.)
1513
- // The subprocess inherits process.env automatically — only config overrides are needed.
1514
- const configEnv = await loadConfigEnv();
1515
1511
 
1516
1512
  // Find a registered driver, or fall back to auto-discovered generic driver
1517
1513
  let driver = getDriver(providerSlug);
@@ -1526,7 +1522,6 @@ export async function runWorkflowWorkerTick(api: OpenClawPluginApi, opts: {
1526
1522
  api,
1527
1523
  prompt: refinedPrompt,
1528
1524
  outputDir: mediaDir,
1529
- env: configEnv,
1530
1525
  timeout: timeoutMs,
1531
1526
  config: node.config as Record<string, unknown> | undefined,
1532
1527
  });