@jiggai/recipes 0.4.73 → 0.5.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.js CHANGED
@@ -15023,7 +15023,7 @@ var recipesPlugin = {
15023
15023
  }
15024
15024
  };
15025
15025
  api.on("message_received", approvalReplyHandler, { priority: 50 });
15026
- (async () => {
15026
+ api.on("gateway_start", async () => {
15027
15027
  try {
15028
15028
  const cfgObj = await loadOpenClawConfig(api);
15029
15029
  const before = JSON.stringify(cfgObj.agents?.list ?? null);
@@ -15036,7 +15036,7 @@ var recipesPlugin = {
15036
15036
  } catch (e) {
15037
15037
  console.error(`[recipes] note: failed to ensure main agent in agents.list: ${e.message}`);
15038
15038
  }
15039
- })();
15039
+ });
15040
15040
  api.registerCli(
15041
15041
  ({ program }) => {
15042
15042
  const cmd = program.command("recipes").description("Manage markdown recipes (scaffold agents/teams)");
package/index.ts CHANGED
@@ -244,9 +244,10 @@ const recipesPlugin = {
244
244
  api.on("message_received" as never, approvalReplyHandler as never, { priority: 50 } as unknown as { priority: number });
245
245
 
246
246
 
247
- // On plugin load, ensure multi-agent config has an explicit agents.list with main at top.
248
- // This is idempotent and only writes if a change is required.
249
- (async () => {
247
+ // Ensure multi-agent config has an explicit agents.list with main at top.
248
+ // Deferred to gateway_start because api.runtime.config.current() is not
249
+ // available during register() in OpenClaw 2026.5.x.
250
+ api.on("gateway_start", async () => {
250
251
  try {
251
252
  const cfgObj = await loadOpenClawConfig(api);
252
253
  const before = JSON.stringify(cfgObj.agents?.list ?? null);
@@ -258,11 +259,9 @@ const recipesPlugin = {
258
259
  console.error("[recipes] ensured agents.list includes main as first/default");
259
260
  }
260
261
  } catch (e) {
261
- // Keep install/scaffold warning-free; this is non-critical and can fail on locked-down configs.
262
- // (If needed, diagnose via debug logs instead of emitting warnings.)
263
262
  console.error(`[recipes] note: failed to ensure main agent in agents.list: ${(e as Error).message}`);
264
263
  }
265
- })();
264
+ });
266
265
 
267
266
  api.registerCli(
268
267
  ({ program }) => {
@@ -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.73",
5
+ "version": "0.5.0",
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.73",
3
+ "version": "0.5.0",
4
4
  "description": "ClawRecipes plugin for OpenClaw (markdown recipes -> scaffold agents/teams)",
5
5
  "main": "dist/index.js",
6
6
  "type": "commonjs",