@elizaos/autonomous 2.0.0-alpha.60 → 2.0.0-alpha.61

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.
@@ -1 +1,2 @@
1
- $ test -f ../prompts/dist/typescript/index.ts || (cd ../prompts && bun run build:typescript) && tsc --noEmit -p tsconfig.json
1
+
2
+ $ test -f ../prompts/dist/typescript/index.ts || (cd ../prompts && bun run build:typescript) && tsc --noEmit -p tsconfig.json
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elizaos/autonomous",
3
- "version": "2.0.0-alpha.60",
3
+ "version": "2.0.0-alpha.61",
4
4
  "description": "Standalone autonomous agent runtime and backend server package for elizaOS.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -238,7 +238,7 @@
238
238
  },
239
239
  "dependencies": {
240
240
  "@clack/prompts": "^1.0.0",
241
- "@elizaos/core": "2.0.0-alpha.60",
241
+ "@elizaos/core": "2.0.0-alpha.61",
242
242
  "@elizaos/plugin-agent-skills": "^2.0.0-alpha.11",
243
243
  "@elizaos/plugin-coding-agent": "0.1.0-next.1",
244
244
  "@elizaos/plugin-cron": "^2.0.0-alpha.7",
@@ -259,8 +259,8 @@
259
259
  "@elizaos/plugin-todo": "alpha",
260
260
  "@elizaos/plugin-trajectory-logger": "alpha",
261
261
  "@elizaos/plugin-trust": "alpha",
262
- "@elizaos/prompts": "2.0.0-alpha.60",
263
- "@elizaos/skills": "2.0.0-alpha.60",
262
+ "@elizaos/prompts": "2.0.0-alpha.61",
263
+ "@elizaos/skills": "2.0.0-alpha.61",
264
264
  "@hapi/boom": "^10.0.1",
265
265
  "@mariozechner/pi-ai": "0.52.12",
266
266
  "@noble/curves": "^2.0.1",
@@ -285,5 +285,5 @@
285
285
  "@types/ws": "^8.18.1",
286
286
  "typescript": "^5.9.3"
287
287
  },
288
- "gitHead": "454beccc910e11d05bcabf2d9ab5a5fc2fbce0a7"
288
+ "gitHead": "6a8cda9c74e9d56d340a652da9940e1b3c7bd472"
289
289
  }
@@ -1,13 +1,20 @@
1
1
  import os from "node:os";
2
2
  import path from "node:path";
3
3
 
4
- const STATE_DIRNAME = ".eliza";
5
- const CONFIG_FILENAME = "eliza.json";
4
+ export function getElizaNamespace(env: NodeJS.ProcessEnv = process.env): string {
5
+ const override = env.ELIZA_NAMESPACE?.trim();
6
+ return override && override.length > 0 ? override : "eliza";
7
+ }
6
8
 
7
- function stateDir(homedir: () => string = os.homedir): string {
8
- return path.join(homedir(), STATE_DIRNAME);
9
+ function stateDir(
10
+ homedir: () => string = os.homedir,
11
+ env: NodeJS.ProcessEnv = process.env,
12
+ ): string {
13
+ const namespace = getElizaNamespace(env);
14
+ return path.join(homedir(), `.${namespace}`);
9
15
  }
10
16
 
17
+
11
18
  export function resolveUserPath(input: string): string {
12
19
  const trimmed = input.trim();
13
20
  if (!trimmed) {
@@ -28,7 +35,7 @@ export function resolveStateDir(
28
35
  if (override) {
29
36
  return resolveUserPath(override);
30
37
  }
31
- return stateDir(homedir);
38
+ return stateDir(homedir, env);
32
39
  }
33
40
 
34
41
  export function resolveConfigPath(
@@ -39,7 +46,8 @@ export function resolveConfigPath(
39
46
  if (override) {
40
47
  return resolveUserPath(override);
41
48
  }
42
- return path.join(stateDirPath, CONFIG_FILENAME);
49
+ const namespace = getElizaNamespace(env);
50
+ return path.join(stateDirPath, `${namespace}.json`);
43
51
  }
44
52
 
45
53
  export function resolveDefaultConfigCandidates(
@@ -51,13 +59,15 @@ export function resolveDefaultConfigCandidates(
51
59
  return [resolveUserPath(explicit)];
52
60
  }
53
61
 
62
+ const namespace = getElizaNamespace(env);
63
+
54
64
  const elizaStateDir = env.ELIZA_STATE_DIR?.trim();
55
65
  if (elizaStateDir) {
56
66
  const resolved = resolveUserPath(elizaStateDir);
57
- return [path.join(resolved, CONFIG_FILENAME)];
67
+ return [path.join(resolved, `${namespace}.json`)];
58
68
  }
59
69
 
60
- return [path.join(stateDir(homedir), CONFIG_FILENAME)];
70
+ return [path.join(stateDir(homedir, env), `${namespace}.json`)];
61
71
  }
62
72
 
63
73
  const OAUTH_FILENAME = "oauth.json";