agentram 0.1.47 → 0.1.48

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/agentram/cli.py CHANGED
@@ -593,6 +593,7 @@ def run_textual_tui(context: McpContext) -> bool:
593
593
  self.context.profile_store.set_agent(slot, endpoint)
594
594
  set_global_agent_if_available(self.context, slot, endpoint)
595
595
  if saved_env_name:
596
+ save_profile_env_if_available(self.context, saved_env_name)
596
597
  save_global_env_if_available(self.context, saved_env_name)
597
598
  if saved_env_name:
598
599
  return f"{slot}={provider}:{model} key=global-jsonl:{saved_env_name}"
@@ -1230,6 +1231,16 @@ def bind_model_text(context: McpContext, options: dict[str, object]) -> str:
1230
1231
  return f"Bound model: {endpoint.get('id')} provider={endpoint.get('provider')} model={endpoint.get('model')} role={endpoint.get('role')}"
1231
1232
 
1232
1233
 
1234
+ def save_profile_env_if_available(context: McpContext, env_name: str) -> bool:
1235
+ if not env_name:
1236
+ return False
1237
+ value = os.getenv(env_name, "")
1238
+ if not value:
1239
+ return False
1240
+ context.profile_store.set_env_value(env_name, value)
1241
+ return True
1242
+
1243
+
1233
1244
  def save_global_env_if_available(context: McpContext, env_name: str) -> bool:
1234
1245
  if not env_name or not global_agent_profile_enabled():
1235
1246
  return False
@@ -1743,7 +1754,7 @@ def model_error_hint(message: str) -> str:
1743
1754
  if "command not found" in lower or "winerror 2" in lower or "the system cannot find the file" in lower:
1744
1755
  return message + r" | Fix: install the CLI or set Main base_url to full command path. For Codex use base_url='C:\Users\admin\AppData\Roaming\npm\codex.cmd exec' or paste codex.cmd path; AgentRAM auto-adds exec when missing."
1745
1756
  if "missing api key env" in lower:
1746
- return message + " | Fix: set environment variable, then bind using --api-key-env ENV_NAME, not raw key."
1757
+ return message + " | Fix: run AgentRAM setup again and paste raw key; AgentRAM stores it in agent_profile.jsonl, not .env."
1747
1758
  return message
1748
1759
 
1749
1760
  def claude_template_root() -> Path:
@@ -152,7 +152,7 @@ def env_value(name: str) -> str:
152
152
  key, raw_value = stripped.split("=", 1)
153
153
  if key.strip() == name:
154
154
  return raw_value.strip().strip('"').strip("'")
155
- return ""
155
+ return global_profile_env_value(name)
156
156
 
157
157
 
158
158
  @dataclass(frozen=True)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentram",
3
- "version": "0.1.47",
3
+ "version": "0.1.48",
4
4
  "description": "Async, model-agnostic Working RAM for coding agents.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/trancongnghia/AGENT_RAM#readme",
package/pyproject.toml CHANGED
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "agentram"
7
- version = "0.1.47"
7
+ version = "0.1.48"
8
8
  description = "Async, model-agnostic RAM layer for agentic coding tools."
9
9
  readme = "README.md"
10
10
  license = "MIT"