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.
- {memorybot-0.3.0 → memorybot-0.3.1}/PKG-INFO +1 -1
- {memorybot-0.3.0 → memorybot-0.3.1}/pyproject.toml +1 -1
- {memorybot-0.3.0 → memorybot-0.3.1}/src/memorybot/__init__.py +1 -1
- {memorybot-0.3.0 → memorybot-0.3.1}/src/memorybot/client.py +5 -5
- {memorybot-0.3.0 → memorybot-0.3.1}/.github/workflows/publish.yml +0 -0
- {memorybot-0.3.0 → memorybot-0.3.1}/.gitignore +0 -0
- {memorybot-0.3.0 → memorybot-0.3.1}/LICENSE +0 -0
- {memorybot-0.3.0 → memorybot-0.3.1}/README.md +0 -0
- {memorybot-0.3.0 → memorybot-0.3.1}/src/memorybot/__main__.py +0 -0
- {memorybot-0.3.0 → memorybot-0.3.1}/src/memorybot/auth.py +0 -0
- {memorybot-0.3.0 → memorybot-0.3.1}/src/memorybot/cli.py +0 -0
- {memorybot-0.3.0 → memorybot-0.3.1}/src/memorybot/config.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: memorybot
|
|
3
|
-
Version: 0.3.
|
|
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
|
|
@@ -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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|