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.
Files changed (41) hide show
  1. {flatagents-2.6.0 → flatagents-2.7.0}/AGENTS.md +1 -1
  2. {flatagents-2.6.0 → flatagents-2.7.0}/MACHINES.md +1 -1
  3. {flatagents-2.6.0 → flatagents-2.7.0}/PKG-INFO +3 -3
  4. {flatagents-2.6.0 → flatagents-2.7.0}/README.md +2 -2
  5. {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/__init__.py +1 -1
  6. {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/assets/flatagent.d.ts +1 -1
  7. {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/assets/flatagent.slim.d.ts +1 -1
  8. {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/assets/flatagents-runtime.d.ts +1 -1
  9. {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/assets/flatagents-runtime.schema.json +1 -1
  10. {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/assets/flatagents-runtime.slim.d.ts +1 -1
  11. {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/assets/flatmachine.d.ts +1 -1
  12. {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/assets/flatmachine.slim.d.ts +1 -1
  13. {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/assets/profiles.d.ts +1 -1
  14. {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/assets/profiles.slim.d.ts +1 -1
  15. {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/providers/openai_codex_auth.py +4 -4
  16. {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/providers/openai_codex_client.py +2 -2
  17. {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/providers/openai_codex_login.py +2 -2
  18. {flatagents-2.6.0 → flatagents-2.7.0}/pyproject.toml +1 -1
  19. {flatagents-2.6.0 → flatagents-2.7.0}/.gitignore +0 -0
  20. {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/assets/README.md +0 -0
  21. {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/assets/__init__.py +0 -0
  22. {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/assets/flatagent.schema.json +0 -0
  23. {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/assets/flatmachine.schema.json +0 -0
  24. {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/assets/profiles.schema.json +0 -0
  25. {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/baseagent.py +0 -0
  26. {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/flatagent.py +0 -0
  27. {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/monitoring.py +0 -0
  28. {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/profiles.py +0 -0
  29. {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/providers/__init__.py +0 -0
  30. {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/providers/anthropic.py +0 -0
  31. {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/providers/cerebras.py +0 -0
  32. {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/providers/github_copilot_auth.py +0 -0
  33. {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/providers/github_copilot_client.py +0 -0
  34. {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/providers/github_copilot_login.py +0 -0
  35. {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/providers/github_copilot_types.py +0 -0
  36. {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/providers/openai.py +0 -0
  37. {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/providers/openai_codex_types.py +0 -0
  38. {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/tool_loop.py +0 -0
  39. {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/tools.py +0 -0
  40. {flatagents-2.6.0 → flatagents-2.7.0}/flatagents/utils.py +0 -0
  41. {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` → `~/.pi/agent/auth.json`
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 ~/.pi/agent/auth.json
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.6.0
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: ~/.pi/agent/auth.json
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 ~/.pi/agent/auth.json
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: ~/.pi/agent/auth.json
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 ~/.pi/agent/auth.json
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
 
@@ -1,4 +1,4 @@
1
- __version__ = "2.6.0"
1
+ __version__ = "2.7.0"
2
2
 
3
3
  from .baseagent import (
4
4
  # Base agent (abstract, for multi-step agents)
@@ -151,7 +151,7 @@
151
151
  * The profile field specifies which profile name to use as base.
152
152
  */
153
153
 
154
- export const SPEC_VERSION = "2.6.0";
154
+ export const SPEC_VERSION = "2.7.0";
155
155
 
156
156
  export interface AgentWrapper {
157
157
  spec: "flatagent";
@@ -1,4 +1,4 @@
1
- export const SPEC_VERSION = "2.6.0";
1
+ export const SPEC_VERSION = "2.7.0";
2
2
  export interface AgentWrapper {
3
3
  spec: "flatagent";
4
4
  spec_version: string;
@@ -800,7 +800,7 @@ export interface BackendConfig {
800
800
  aws_region?: string;
801
801
  }
802
802
 
803
- export const SPEC_VERSION = "2.6.0";
803
+ export const SPEC_VERSION = "2.7.0";
804
804
 
805
805
  export interface SDKRuntimeWrapper {
806
806
  spec: "flatagents-runtime";
@@ -11,7 +11,7 @@
11
11
  },
12
12
  "spec_version": {
13
13
  "type": "string",
14
- "const": "2.6.0"
14
+ "const": "2.7.0"
15
15
  },
16
16
  "execution_lock": {
17
17
  "$ref": "#/definitions/ExecutionLock"
@@ -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.6.0";
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;
@@ -319,7 +319,7 @@
319
319
  * config_hash - Content-addressed machine config key for cross-SDK resume (v2.1.0)
320
320
  */
321
321
 
322
- export const SPEC_VERSION = "2.6.0";
322
+ export const SPEC_VERSION = "2.7.0";
323
323
 
324
324
  export interface MachineWrapper {
325
325
  spec: "flatmachine";
@@ -1,4 +1,4 @@
1
- export const SPEC_VERSION = "2.6.0";
1
+ export const SPEC_VERSION = "2.7.0";
2
2
  export interface MachineWrapper {
3
3
  spec: "flatmachine";
4
4
  spec_version: string;
@@ -110,7 +110,7 @@
110
110
  * oauth - OAuth settings (used by codex/copilot backends)
111
111
  */
112
112
 
113
- export const SPEC_VERSION = "2.6.0";
113
+ export const SPEC_VERSION = "2.7.0";
114
114
 
115
115
  export interface ProfilesWrapper {
116
116
  spec: "flatprofiles";
@@ -1,4 +1,4 @@
1
- export const SPEC_VERSION = "2.6.0";
1
+ export const SPEC_VERSION = "2.7.0";
2
2
  export interface ProfilesWrapper {
3
3
  spec: "flatprofiles";
4
4
  spec_version: string;
@@ -13,7 +13,7 @@ import httpx
13
13
 
14
14
  from .openai_codex_types import CodexOAuthCredential
15
15
 
16
- DEFAULT_AUTH_FILE = "~/.pi/agent/auth.json"
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 PiAuthStore:
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: PiAuthStore,
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: PiAuthStore,
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
- PiAuthStore,
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 = PiAuthStore(self.config.auth_file)
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
- PiAuthStore,
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 = PiAuthStore(resolved_auth_file)
265
+ store = CodexAuthStore(resolved_auth_file)
266
266
  store.save_provider(
267
267
  provider,
268
268
  {
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "flatagents"
7
- version = "2.6.0"
7
+ version = "2.7.0"
8
8
  description = "A lightweight framework for building LLM-powered agents."
9
9
  readme = "README.md"
10
10
  license = "Apache-2.0"
File without changes