memorybot 0.3.0__tar.gz → 0.3.1__tar.gz

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,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: memorybot
3
- Version: 0.3.0
3
+ Version: 0.3.1
4
4
  Summary: MemoryBot CLI — your personal knowledge graph from the command line
5
5
  Project-URL: Homepage, https://www.memorybot.com
6
6
  Project-URL: Repository, https://github.com/nolanlove/memorybot-cli
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "memorybot"
7
- version = "0.3.0"
7
+ version = "0.3.1"
8
8
  description = "MemoryBot CLI — your personal knowledge graph from the command line"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -1,3 +1,3 @@
1
1
  """MemoryBot CLI."""
2
2
 
3
- __version__ = "0.3.0"
3
+ __version__ = "0.3.1"
@@ -3,12 +3,12 @@
3
3
  from __future__ import annotations
4
4
 
5
5
  import os
6
- from typing import Any
6
+ from typing import Any, Optional
7
7
 
8
8
  import httpx
9
9
 
10
10
  from .auth import refresh_access_token
11
- from .config import Config, resolve_access_token
11
+ from .config import Config, resolve_access_token, resolve_server_url
12
12
 
13
13
  TOOL_EXEC_PATH = "/memory/api/tool-exec/"
14
14
 
@@ -29,9 +29,9 @@ class ToolError(RuntimeError):
29
29
 
30
30
 
31
31
  class Client:
32
- def __init__(self, cfg: Config, server_url: str) -> None:
33
- self.cfg = cfg
34
- self.server_url = server_url
32
+ def __init__(self, cfg: Optional[Config] = None, server_url: Optional[str] = None) -> None:
33
+ self.cfg = cfg if cfg is not None else Config.load()
34
+ self.server_url = server_url or resolve_server_url(None, self.cfg)
35
35
 
36
36
  def _token(self) -> str:
37
37
  token = resolve_access_token(self.cfg)
File without changes
File without changes
File without changes