@elizaos/prompts 2.0.0-alpha.2 → 2.0.0-alpha.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@elizaos/prompts",
3
3
  "private": false,
4
- "version": "2.0.0-alpha.2",
4
+ "version": "2.0.0-alpha.3",
5
5
  "description": "Shared prompt templates for elizaOS across TypeScript, Python, and Rust",
6
6
  "type": "module",
7
7
  "main": "./dist/typescript/index.ts",
@@ -43,5 +43,5 @@
43
43
  "publishConfig": {
44
44
  "access": "public"
45
45
  },
46
- "gitHead": "bc6cac8d36845d7cbde51a64307c6a57c16378ad"
46
+ "gitHead": "658f659feda0e65899d9b0e8aa17ff9445dd715a"
47
47
  }
@@ -420,9 +420,14 @@ function loadSpecs(dir, corePath, kind) {
420
420
  }
421
421
 
422
422
  /**
423
- * @param {string} dir
423
+ * Ensures a directory exists, creating it and parent directories if necessary.
424
+ * @param {string} dir - The directory path to ensure exists
425
+ * @throws {Error} If the directory path is empty or whitespace-only
424
426
  */
425
427
  function ensureDir(dir) {
428
+ if (!dir || dir.trim() === "") {
429
+ throw new Error("Directory path cannot be empty");
430
+ }
426
431
  fs.mkdirSync(dir, { recursive: true });
427
432
  }
428
433
 
@@ -41,7 +41,15 @@ function readJson(filePath) {
41
41
  return JSON.parse(readText(filePath));
42
42
  }
43
43
 
44
+ /**
45
+ * Ensures a directory exists, creating it and parent directories if necessary.
46
+ * @param {string} dir - The directory path to ensure exists
47
+ * @throws {Error} If the directory path is empty or whitespace-only
48
+ */
44
49
  function ensureDir(dir) {
50
+ if (!dir || dir.trim() === "") {
51
+ throw new Error("Directory path cannot be empty");
52
+ }
45
53
  fs.mkdirSync(dir, { recursive: true });
46
54
  }
47
55
 
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Shaw Walters and elizaOS Contributors
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.