@1mancompany/onemancompany 0.7.55 → 0.7.56

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@1mancompany/onemancompany",
3
- "version": "0.7.55",
3
+ "version": "0.7.56",
4
4
  "description": "The AI Operating System for One-Person Companies",
5
5
  "bin": {
6
6
  "onemancompany": "bin/cli.js"
package/pyproject.toml CHANGED
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "onemancompany"
3
- version = "0.7.55"
3
+ version = "0.7.56"
4
4
  description = "A one-man company simulation with pixel art visualization and LangChain AI agents"
5
5
  requires-python = ">=3.12"
6
6
  dependencies = [
@@ -595,7 +595,13 @@ settings = Settings()
595
595
 
596
596
 
597
597
  def update_env_var(key: str, value: str) -> None:
598
- """Update or add a variable in the .env file, then reload settings."""
598
+ """Update or add a variable in the .env file, then reload settings.
599
+
600
+ Also syncs os.environ so that pydantic BaseSettings (which reads os.environ
601
+ with higher priority than .env files) sees the new value immediately.
602
+ """
603
+ import os as _os
604
+
599
605
  env_path = DATA_ROOT / DOT_ENV_FILENAME
600
606
  lines: list[str] = []
601
607
  found = False
@@ -610,6 +616,9 @@ def update_env_var(key: str, value: str) -> None:
610
616
  if not found:
611
617
  lines.append(f"{key}={value}")
612
618
  env_path.write_text("\n".join(lines) + "\n", encoding=ENCODING_UTF8)
619
+ # Sync os.environ — main.py's load_dotenv() seeds it at startup;
620
+ # without this, the stale env var wins over the updated .env file.
621
+ _os.environ[key] = value
613
622
  reload_settings()
614
623
 
615
624