@llblab/pi-actors 0.16.2 → 0.16.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.16.3: Recipe Import Path Placeholders
4
+
5
+ - `[Template Recipes]` Added static `{repo}` and `{agent}` expansion for recipe paths, including `imports` and `from` bindings. Impact: recipes can import sibling packaged/user recipes without hard-coded absolute paths while keeping imports load-time deterministic.
6
+ - `[Docs]` Documented `{repo}` and `{agent}` import path placeholders in the template recipe standard.
7
+ - `[Package]` Bumped package and packaged skill metadata to `0.16.3` for the hotfix release.
8
+
3
9
  ## 0.16.2: Recipe Registry Diagnostics Hotfix
4
10
 
5
11
  - `[Schema]` Derived recipe tool arguments without expanding runtime-dependent repeat nodes. Impact: valid recipes using repeat expressions such as `{lenses.length}` can be exposed as tools instead of being skipped during startup schema generation.
@@ -245,7 +245,7 @@ File-backed recipes may import other file-backed recipes at the recipe layer. Im
245
245
 
246
246
  An import binding may be either a string recipe path/name or an object with:
247
247
 
248
- - `from`: recipe path or bare name.
248
+ - `from`: recipe path or bare name. Import paths support static load-time placeholders: `{repo}` expands to the directory above the active recipe root, and `{agent}` expands to the pi agent directory. For a packaged recipe in `<repo>/recipes/name.json`, `{repo}/recipes/other.json` resolves to a sibling packaged recipe. For a user recipe in `~/.pi/agent/recipes/name.json`, `{repo}` and `{agent}` both resolve to `~/.pi/agent`.
249
249
  - `defaults`: extra default values exposed through the import.
250
250
  - `values`: explicit values for embedding that imported recipe.
251
251
 
@@ -75,11 +75,15 @@ export function resolveRecipePath(
75
75
  recipeRoot = Paths.getRecipeRoot(),
76
76
  ): string {
77
77
  const trimmed = value.trim();
78
- if (trimmed.startsWith("~/")) return resolve(homedir(), trimmed.slice(2));
79
- if (trimmed.includes("/")) return resolve(trimmed);
78
+ const repoRoot = resolve(recipeRoot, "..");
79
+ const expanded = trimmed
80
+ .replaceAll("{repo}", repoRoot)
81
+ .replaceAll("{agent}", Paths.getAgentDir());
82
+ if (expanded.startsWith("~/")) return resolve(homedir(), expanded.slice(2));
83
+ if (expanded.includes("/")) return resolve(expanded);
80
84
  return resolve(
81
85
  recipeRoot,
82
- trimmed.endsWith(".json") ? trimmed : `${trimmed}.json`,
86
+ expanded.endsWith(".json") ? expanded : `${expanded}.json`,
83
87
  );
84
88
  }
85
89
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@llblab/pi-actors",
3
- "version": "0.16.2",
3
+ "version": "0.16.3",
4
4
  "private": false,
5
5
  "description": "Actor runtime and orchestrator for agent-managed local processes",
6
6
  "keywords": [
@@ -2,7 +2,7 @@
2
2
  name: actors
3
3
  description: Highest-density practical guide for pi-actors. Read this skill whenever prompt and tools are not enough for spawn, message, inspect, actor runs, tools, recipes, command templates, async lifecycle, mailboxes, artifacts, and local orchestration mechanics.
4
4
  metadata:
5
- version: 0.16.2
5
+ version: 0.16.3
6
6
  ---
7
7
 
8
8
  # Actors (pi-actors)
@@ -2,7 +2,7 @@
2
2
  name: swarm
3
3
  description: Subagent orchestration with scoped locks and quorum consensus. Use for multi-model review, parallel scoped work, delegated audit, and coordinated subagent execution.
4
4
  metadata:
5
- version: 0.16.2
5
+ version: 0.16.3
6
6
  ---
7
7
 
8
8
  # Swarm