flatagents 2.6.0__tar.gz → 2.7.0__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.
- {flatagents-2.6.0 → flatagents-2.7.0}/AGENTS.md +1 -1
- {flatagents-2.6.0 → flatagents-2.7.0}/MACHINES.md +1 -1
- {flatagents-2.6.0 → flatagents-2.7.0}/PKG-INFO +3 -3
- {flatagents-2.6.0 → flatagents-2.7.0}/README.md +2 -2
- {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/__init__.py +1 -1
- {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/assets/flatagent.d.ts +1 -1
- {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/assets/flatagent.slim.d.ts +1 -1
- {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/assets/flatagents-runtime.d.ts +1 -1
- {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/assets/flatagents-runtime.schema.json +1 -1
- {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/assets/flatagents-runtime.slim.d.ts +1 -1
- {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/assets/flatmachine.d.ts +1 -1
- {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/assets/flatmachine.slim.d.ts +1 -1
- {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/assets/profiles.d.ts +1 -1
- {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/assets/profiles.slim.d.ts +1 -1
- {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/providers/openai_codex_auth.py +4 -4
- {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/providers/openai_codex_client.py +2 -2
- {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/providers/openai_codex_login.py +2 -2
- {flatagents-2.6.0 → flatagents-2.7.0}/pyproject.toml +1 -1
- {flatagents-2.6.0 → flatagents-2.7.0}/.gitignore +0 -0
- {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/assets/README.md +0 -0
- {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/assets/__init__.py +0 -0
- {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/assets/flatagent.schema.json +0 -0
- {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/assets/flatmachine.schema.json +0 -0
- {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/assets/profiles.schema.json +0 -0
- {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/baseagent.py +0 -0
- {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/flatagent.py +0 -0
- {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/monitoring.py +0 -0
- {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/profiles.py +0 -0
- {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/providers/__init__.py +0 -0
- {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/providers/anthropic.py +0 -0
- {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/providers/cerebras.py +0 -0
- {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/providers/github_copilot_auth.py +0 -0
- {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/providers/github_copilot_client.py +0 -0
- {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/providers/github_copilot_login.py +0 -0
- {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/providers/github_copilot_types.py +0 -0
- {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/providers/openai.py +0 -0
- {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/providers/openai_codex_types.py +0 -0
- {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/tool_loop.py +0 -0
- {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/tools.py +0 -0
- {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/utils.py +0 -0
- {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/validation.py +0 -0
|
@@ -40,7 +40,7 @@ Resolution: default → profile → overrides → override
|
|
|
40
40
|
- Backend selection precedence remains: constructor `backend` → resolved `model.backend` → auto-detect (litellm/aisuite only).
|
|
41
41
|
- `oauth` settings are read from resolved model config; works identically whether model came from inline agent config or profile.
|
|
42
42
|
- Auth file precedence:
|
|
43
|
-
- Codex: `oauth.auth_file` → legacy `codex_auth_file` → legacy `auth.auth_file` → `FLATAGENTS_CODEX_AUTH_FILE` → `~/.
|
|
43
|
+
- Codex: `oauth.auth_file` → legacy `codex_auth_file` → legacy `auth.auth_file` → `FLATAGENTS_CODEX_AUTH_FILE` → `~/.agents/flatmachines/auth.json`
|
|
44
44
|
- Copilot: `oauth.auth_file` → `copilot_auth_file` → legacy `auth.auth_file` → `FLATAGENTS_COPILOT_AUTH_FILE` → `~/.agents/flatmachines/auth.json`
|
|
45
45
|
- Token handling: pre-request refresh on expiry; if refresh fails, re-read auth store once for cross-process refresh; fallback refresh+retry on `401/403`.
|
|
46
46
|
- Retries on `429/500/502/503/504` with exponential backoff (no jitter).
|
|
@@ -129,7 +129,7 @@ Codex and Copilot are never auto-detected; configure them explicitly via `backen
|
|
|
129
129
|
|
|
130
130
|
Login helpers:
|
|
131
131
|
```bash
|
|
132
|
-
python -m flatagents.providers.openai_codex_login --auth-file ~/.
|
|
132
|
+
python -m flatagents.providers.openai_codex_login --auth-file ~/.agents/flatmachines/auth.json
|
|
133
133
|
python -m flatagents.providers.github_copilot_login --auth-file ~/.agents/flatmachines/auth.json
|
|
134
134
|
```
|
|
135
135
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: flatagents
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.7.0
|
|
4
4
|
Summary: A lightweight framework for building LLM-powered agents.
|
|
5
5
|
Project-URL: Homepage, https://github.com/memgrafter/flatagents
|
|
6
6
|
Project-URL: Repository, https://github.com/memgrafter/flatagents
|
|
@@ -137,7 +137,7 @@ model:
|
|
|
137
137
|
name: gpt-5
|
|
138
138
|
backend: codex
|
|
139
139
|
oauth:
|
|
140
|
-
auth_file: ~/.
|
|
140
|
+
auth_file: ~/.agents/flatmachines/auth.json
|
|
141
141
|
```
|
|
142
142
|
|
|
143
143
|
```yaml
|
|
@@ -152,7 +152,7 @@ model:
|
|
|
152
152
|
Login helpers:
|
|
153
153
|
|
|
154
154
|
```bash
|
|
155
|
-
python -m flatagents.providers.openai_codex_login --auth-file ~/.
|
|
155
|
+
python -m flatagents.providers.openai_codex_login --auth-file ~/.agents/flatmachines/auth.json
|
|
156
156
|
python -m flatagents.providers.github_copilot_login --auth-file ~/.agents/flatmachines/auth.json
|
|
157
157
|
```
|
|
158
158
|
|
|
@@ -94,7 +94,7 @@ model:
|
|
|
94
94
|
name: gpt-5
|
|
95
95
|
backend: codex
|
|
96
96
|
oauth:
|
|
97
|
-
auth_file: ~/.
|
|
97
|
+
auth_file: ~/.agents/flatmachines/auth.json
|
|
98
98
|
```
|
|
99
99
|
|
|
100
100
|
```yaml
|
|
@@ -109,7 +109,7 @@ model:
|
|
|
109
109
|
Login helpers:
|
|
110
110
|
|
|
111
111
|
```bash
|
|
112
|
-
python -m flatagents.providers.openai_codex_login --auth-file ~/.
|
|
112
|
+
python -m flatagents.providers.openai_codex_login --auth-file ~/.agents/flatmachines/auth.json
|
|
113
113
|
python -m flatagents.providers.github_copilot_login --auth-file ~/.agents/flatmachines/auth.json
|
|
114
114
|
```
|
|
115
115
|
|
|
@@ -252,7 +252,7 @@ export interface BackendConfig {
|
|
|
252
252
|
dynamodb_table?: string;
|
|
253
253
|
aws_region?: string;
|
|
254
254
|
}
|
|
255
|
-
export const SPEC_VERSION = "2.
|
|
255
|
+
export const SPEC_VERSION = "2.7.0";
|
|
256
256
|
export interface SDKRuntimeWrapper {
|
|
257
257
|
spec: "flatagents-runtime";
|
|
258
258
|
spec_version: typeof SPEC_VERSION;
|
|
@@ -13,7 +13,7 @@ import httpx
|
|
|
13
13
|
|
|
14
14
|
from .openai_codex_types import CodexOAuthCredential
|
|
15
15
|
|
|
16
|
-
DEFAULT_AUTH_FILE = "~/.
|
|
16
|
+
DEFAULT_AUTH_FILE = "~/.agents/flatmachines/auth.json"
|
|
17
17
|
DEFAULT_PROVIDER = "openai-codex"
|
|
18
18
|
TOKEN_URL = "https://auth.openai.com/oauth/token"
|
|
19
19
|
OPENAI_CODEX_CLIENT_ID = "app_EMoamEEZ73f0CkXaXp7hrann"
|
|
@@ -77,7 +77,7 @@ def is_expired(expires_ms: int, skew_ms: int = 60_000) -> bool:
|
|
|
77
77
|
return int(time.time() * 1000) >= int(expires_ms) - skew_ms
|
|
78
78
|
|
|
79
79
|
|
|
80
|
-
class
|
|
80
|
+
class CodexAuthStore:
|
|
81
81
|
def __init__(
|
|
82
82
|
self,
|
|
83
83
|
auth_file: Optional[str] = None,
|
|
@@ -213,14 +213,14 @@ async def refresh_openai_codex_token(
|
|
|
213
213
|
|
|
214
214
|
|
|
215
215
|
def load_codex_credential(
|
|
216
|
-
store:
|
|
216
|
+
store: CodexAuthStore,
|
|
217
217
|
provider: str = DEFAULT_PROVIDER,
|
|
218
218
|
) -> CodexOAuthCredential:
|
|
219
219
|
return _credential_from_dict(store.load_provider(provider))
|
|
220
220
|
|
|
221
221
|
|
|
222
222
|
async def refresh_codex_credential(
|
|
223
|
-
store:
|
|
223
|
+
store: CodexAuthStore,
|
|
224
224
|
provider: str = DEFAULT_PROVIDER,
|
|
225
225
|
*,
|
|
226
226
|
timeout_seconds: float = 20.0,
|
|
@@ -14,7 +14,7 @@ from .openai_codex_auth import (
|
|
|
14
14
|
DEFAULT_PROVIDER,
|
|
15
15
|
OPENAI_CODEX_CLIENT_ID,
|
|
16
16
|
TOKEN_URL,
|
|
17
|
-
|
|
17
|
+
CodexAuthStore,
|
|
18
18
|
is_expired,
|
|
19
19
|
load_codex_credential,
|
|
20
20
|
refresh_codex_credential,
|
|
@@ -98,7 +98,7 @@ class CodexClient:
|
|
|
98
98
|
)
|
|
99
99
|
|
|
100
100
|
self._model_config = model_config
|
|
101
|
-
self._auth_store =
|
|
101
|
+
self._auth_store = CodexAuthStore(self.config.auth_file)
|
|
102
102
|
self._transport = transport
|
|
103
103
|
|
|
104
104
|
async def call(self, params: Dict[str, Any]) -> CodexResult:
|
|
@@ -19,7 +19,7 @@ from .openai_codex_auth import (
|
|
|
19
19
|
DEFAULT_PROVIDER,
|
|
20
20
|
OPENAI_CODEX_CLIENT_ID,
|
|
21
21
|
TOKEN_URL,
|
|
22
|
-
|
|
22
|
+
CodexAuthStore,
|
|
23
23
|
extract_account_id_from_access_token,
|
|
24
24
|
resolve_auth_file,
|
|
25
25
|
)
|
|
@@ -262,7 +262,7 @@ async def login_openai_codex(
|
|
|
262
262
|
credentials = await exchange_authorization_code(code=code, verifier=flow.verifier)
|
|
263
263
|
|
|
264
264
|
resolved_auth_file = resolve_auth_file(explicit_path=auth_file)
|
|
265
|
-
store =
|
|
265
|
+
store = CodexAuthStore(resolved_auth_file)
|
|
266
266
|
store.save_provider(
|
|
267
267
|
provider,
|
|
268
268
|
{
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|