@jiggai/recipes 0.2.15 → 0.2.17

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/README.md CHANGED
@@ -15,6 +15,12 @@ Once published:
15
15
 
16
16
  ```bash
17
17
  openclaw plugins install @jiggai/recipes
18
+
19
+ # If you use a plugin allowlist (plugins.allow), you must explicitly trust it:
20
+ openclaw config get plugins.allow --json
21
+ # then add "recipes" and set it back, e.g.
22
+ openclaw config set plugins.allow --json '["memory-core","telegram","recipes"]'
23
+
18
24
  openclaw gateway restart
19
25
  openclaw plugins list
20
26
  ```
@@ -15,6 +15,13 @@ Once published, you can install directly via npm:
15
15
 
16
16
  ```bash
17
17
  openclaw plugins install @jiggai/recipes
18
+
19
+ # If you have plugins.allow set (plugin allowlist), you must explicitly add "recipes"
20
+ # or OpenClaw will refuse to load it.
21
+ openclaw config get plugins.allow --json
22
+ # then add "recipes" and set it back, e.g.
23
+ openclaw config set plugins.allow --json '["memory-core","telegram","recipes"]'
24
+
18
25
  openclaw gateway restart
19
26
  openclaw plugins list
20
27
  ```
package/index.ts CHANGED
@@ -386,7 +386,12 @@ async function reconcileRecipeCronJobs(opts: {
386
386
  const statePath = path.join(opts.scope.stateDir, "notes", "cron-jobs.json");
387
387
  const state = await loadCronMappingState(statePath);
388
388
 
389
- const list = await cronList(opts.api);
389
+ // Fast path: if we have no prior installed ids for these desired jobs, skip cron.list.
390
+ // cron.list can be slow/hang on some setups; we can still create jobs and record ids.
391
+ const desiredKeys = desired.map((j) => cronKey(opts.scope as any, j.id));
392
+ const hasAnyInstalled = desiredKeys.some((k) => Boolean(state.entries[k]?.installedCronId));
393
+
394
+ const list = hasAnyInstalled ? await cronList(opts.api) : { jobs: [] };
390
395
  const byId = new Map((list?.jobs ?? []).map((j) => [j.id, j] as const));
391
396
 
392
397
  const now = Date.now();
@@ -2277,6 +2282,17 @@ const recipesPlugin = {
2277
2282
  const teamMd = `# ${teamId}\n\nShared workspace for this agent team.\n\n## Folders\n- inbox/ — requests\n- outbox/ — deliverables\n- shared-context/ — curated shared context + append-only agent outputs\n- shared/ — legacy shared artifacts (back-compat)\n- notes/ — plan + status\n- work/ — working files\n`;
2278
2283
  await writeFileSafely(teamMdPath, teamMd, options.overwrite ? "overwrite" : "createOnly");
2279
2284
 
2285
+ // Persist provenance (parent recipe) for UIs like ClawKitchen.
2286
+ // This avoids brittle heuristics like teamId==recipeId guessing.
2287
+ const teamMetaPath = path.join(teamDir, "team.json");
2288
+ const teamMeta = {
2289
+ teamId,
2290
+ recipeId: recipe.id,
2291
+ recipeName: recipe.name ?? "",
2292
+ scaffoldedAt: new Date().toISOString(),
2293
+ };
2294
+ await writeJsonFile(teamMetaPath, teamMeta);
2295
+
2280
2296
  if (options.applyConfig) {
2281
2297
  const snippets: AgentConfigSnippet[] = results.map((x: any) => x.next.configSnippet);
2282
2298
  await applyAgentSnippetsToOpenClawConfig(api, snippets);
@@ -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.1.0",
5
+ "version": "0.2.17",
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.2.15",
3
+ "version": "0.2.17",
4
4
  "description": "ClawRecipes plugin for OpenClaw (markdown recipes -> scaffold agents/teams)",
5
5
  "main": "index.ts",
6
6
  "type": "commonjs",