@possumtech/rummy 0.2.4 → 0.2.5

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/.env.example CHANGED
@@ -1,3 +1,10 @@
1
+ # DO NOT EDIT OR REMOVE!
2
+ # COPY TO ~/.rummy.env or add appropriate
3
+ # environment variables to ~/.bashrc or wherever
4
+
5
+ # This project uses cascading environment variables
6
+ # (environment) > ~/.rummy/.env > ~/.rummy/.env.example
7
+
1
8
  # Service Configuration
2
9
  PORT=3044
3
10
 
package/bin/rummy.js CHANGED
@@ -1,12 +1,13 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { existsSync, mkdirSync } from "node:fs";
3
+ import { existsSync, mkdirSync, copyFileSync } from "node:fs";
4
4
  import { join, dirname } from "node:path";
5
5
  import { fileURLToPath } from "node:url";
6
6
  import { homedir } from "node:os";
7
7
 
8
8
  const __dirname = dirname(fileURLToPath(import.meta.url));
9
9
  const packageRoot = join(__dirname, "..");
10
+ const envExample = join(packageRoot, ".env.example");
10
11
 
11
12
  // Resolve RUMMY_HOME
12
13
  const rummyHome = process.env.RUMMY_HOME || join(homedir(), ".rummy");
@@ -22,8 +23,11 @@ for (const dir of ["plugins", "skills", "personas"]) {
22
23
  if (!existsSync(path)) mkdirSync(path, { recursive: true });
23
24
  }
24
25
 
26
+ // Keep .env.example in RUMMY_HOME as reference
27
+ copyFileSync(envExample, join(rummyHome, ".env.example"));
28
+
25
29
  // Load defaults from .env.example, then user overrides from ~/.rummy/.env
26
- process.loadEnvFile(join(packageRoot, ".env.example"));
30
+ process.loadEnvFile(envExample);
27
31
  const userEnv = join(rummyHome, ".env");
28
32
  if (existsSync(userEnv)) process.loadEnvFile(userEnv);
29
33
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@possumtech/rummy",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "Relational Unknowns Memory Management Yoke",
5
5
  "keywords": [
6
6
  "llm"