flatagents 2.2.0__tar.gz → 2.2.2__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.2.0 → flatagents-2.2.2}/.gitignore +2 -0
- {flatagents-2.2.0 → flatagents-2.2.2}/PKG-INFO +1 -1
- {flatagents-2.2.0 → flatagents-2.2.2}/flatagents/__init__.py +1 -1
- {flatagents-2.2.0 → flatagents-2.2.2}/flatagents/assets/flatagent.d.ts +1 -1
- {flatagents-2.2.0 → flatagents-2.2.2}/flatagents/assets/flatagent.slim.d.ts +1 -1
- {flatagents-2.2.0 → flatagents-2.2.2}/flatagents/assets/flatagents-runtime.d.ts +1 -1
- {flatagents-2.2.0 → flatagents-2.2.2}/flatagents/assets/flatagents-runtime.schema.json +1 -1
- {flatagents-2.2.0 → flatagents-2.2.2}/flatagents/assets/flatagents-runtime.slim.d.ts +1 -1
- {flatagents-2.2.0 → flatagents-2.2.2}/flatagents/assets/flatmachine.d.ts +5 -3
- {flatagents-2.2.0 → flatagents-2.2.2}/flatagents/assets/flatmachine.schema.json +10 -1
- {flatagents-2.2.0 → flatagents-2.2.2}/flatagents/assets/flatmachine.slim.d.ts +3 -2
- {flatagents-2.2.0 → flatagents-2.2.2}/flatagents/assets/profiles.d.ts +1 -1
- {flatagents-2.2.0 → flatagents-2.2.2}/flatagents/assets/profiles.slim.d.ts +1 -1
- {flatagents-2.2.0 → flatagents-2.2.2}/flatagents/flatagent.py +7 -2
- {flatagents-2.2.0 → flatagents-2.2.2}/pyproject.toml +1 -1
- {flatagents-2.2.0 → flatagents-2.2.2}/MACHINES.md +0 -0
- {flatagents-2.2.0 → flatagents-2.2.2}/README.md +0 -0
- {flatagents-2.2.0 → flatagents-2.2.2}/flatagents/assets/README.md +0 -0
- {flatagents-2.2.0 → flatagents-2.2.2}/flatagents/assets/__init__.py +0 -0
- {flatagents-2.2.0 → flatagents-2.2.2}/flatagents/assets/flatagent.schema.json +0 -0
- {flatagents-2.2.0 → flatagents-2.2.2}/flatagents/assets/profiles.schema.json +0 -0
- {flatagents-2.2.0 → flatagents-2.2.2}/flatagents/baseagent.py +0 -0
- {flatagents-2.2.0 → flatagents-2.2.2}/flatagents/monitoring.py +0 -0
- {flatagents-2.2.0 → flatagents-2.2.2}/flatagents/profiles.py +0 -0
- {flatagents-2.2.0 → flatagents-2.2.2}/flatagents/providers/__init__.py +0 -0
- {flatagents-2.2.0 → flatagents-2.2.2}/flatagents/providers/anthropic.py +0 -0
- {flatagents-2.2.0 → flatagents-2.2.2}/flatagents/providers/cerebras.py +0 -0
- {flatagents-2.2.0 → flatagents-2.2.2}/flatagents/providers/openai.py +0 -0
- {flatagents-2.2.0 → flatagents-2.2.2}/flatagents/tool_loop.py +0 -0
- {flatagents-2.2.0 → flatagents-2.2.2}/flatagents/tools.py +0 -0
- {flatagents-2.2.0 → flatagents-2.2.2}/flatagents/utils.py +0 -0
- {flatagents-2.2.0 → flatagents-2.2.2}/flatagents/validation.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: flatagents
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.2
|
|
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
|
|
@@ -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.2.
|
|
255
|
+
export const SPEC_VERSION = "2.2.2";
|
|
256
256
|
export interface SDKRuntimeWrapper {
|
|
257
257
|
spec: "flatagents-runtime";
|
|
258
258
|
spec_version: typeof SPEC_VERSION;
|
|
@@ -240,7 +240,7 @@
|
|
|
240
240
|
* PERSISTENCE (v0.2.0):
|
|
241
241
|
* --------------------
|
|
242
242
|
* MachineSnapshot - Wire format for checkpoints (execution_id, state, context, step)
|
|
243
|
-
* PersistenceConfig - Backend config: {enabled: true, backend: "local"|"memory"}
|
|
243
|
+
* PersistenceConfig - Backend config: {enabled: true, backend: "local"|"memory"|"sqlite"}
|
|
244
244
|
* checkpoint_on - Events to checkpoint: ["machine_start", "execute", "machine_end"]
|
|
245
245
|
*
|
|
246
246
|
* MACHINE LAUNCHING:
|
|
@@ -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.2.
|
|
322
|
+
export const SPEC_VERSION = "2.2.2";
|
|
323
323
|
|
|
324
324
|
export interface MachineWrapper {
|
|
325
325
|
spec: "flatmachine";
|
|
@@ -467,7 +467,9 @@ export interface MachineSnapshot {
|
|
|
467
467
|
|
|
468
468
|
export interface PersistenceConfig {
|
|
469
469
|
enabled: boolean;
|
|
470
|
-
backend: "local" | "
|
|
470
|
+
backend: "local" | "sqlite" | "memory";
|
|
471
|
+
/** Database file path for sqlite backend. Defaults to "flatmachines.sqlite". */
|
|
472
|
+
db_path?: string;
|
|
471
473
|
checkpoint_on?: string[];
|
|
472
474
|
[key: string]: any;
|
|
473
475
|
}
|
|
@@ -707,7 +707,16 @@
|
|
|
707
707
|
"type": "boolean"
|
|
708
708
|
},
|
|
709
709
|
"backend": {
|
|
710
|
-
"type": "string"
|
|
710
|
+
"type": "string",
|
|
711
|
+
"enum": [
|
|
712
|
+
"local",
|
|
713
|
+
"sqlite",
|
|
714
|
+
"memory"
|
|
715
|
+
]
|
|
716
|
+
},
|
|
717
|
+
"db_path": {
|
|
718
|
+
"type": "string",
|
|
719
|
+
"description": "Database file path for sqlite backend. Defaults to \"flatmachines.sqlite\"."
|
|
711
720
|
},
|
|
712
721
|
"checkpoint_on": {
|
|
713
722
|
"type": "array",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const SPEC_VERSION = "2.2.
|
|
1
|
+
export const SPEC_VERSION = "2.2.2";
|
|
2
2
|
export interface MachineWrapper {
|
|
3
3
|
spec: "flatmachine";
|
|
4
4
|
spec_version: string;
|
|
@@ -127,7 +127,8 @@ export interface MachineSnapshot {
|
|
|
127
127
|
}
|
|
128
128
|
export interface PersistenceConfig {
|
|
129
129
|
enabled: boolean;
|
|
130
|
-
backend: "local" | "
|
|
130
|
+
backend: "local" | "sqlite" | "memory";
|
|
131
|
+
db_path?: string;
|
|
131
132
|
checkpoint_on?: string[];
|
|
132
133
|
[key: string]: any;
|
|
133
134
|
}
|
|
@@ -686,6 +686,11 @@ class FlatAgent:
|
|
|
686
686
|
# Render prompts
|
|
687
687
|
system_prompt = self._render_system_prompt(input_data, tools_prompt=tools_prompt, tools=_mcp_tools)
|
|
688
688
|
user_prompt = self._render_user_prompt(input_data, tools_prompt=tools_prompt, tools=_mcp_tools)
|
|
689
|
+
rendered_user_prompt = user_prompt
|
|
690
|
+
if messages is not None and not input_data:
|
|
691
|
+
# Continuation call without fresh input should not report a synthetic
|
|
692
|
+
# rendered prompt (it wasn't added to request messages).
|
|
693
|
+
rendered_user_prompt = None
|
|
689
694
|
|
|
690
695
|
# Build messages
|
|
691
696
|
if messages:
|
|
@@ -854,7 +859,7 @@ class FlatAgent:
|
|
|
854
859
|
rate_limit=rate_limit_info,
|
|
855
860
|
finish_reason=FinishReason.ERROR,
|
|
856
861
|
raw_response=getattr(e, 'response', None),
|
|
857
|
-
rendered_user_prompt=
|
|
862
|
+
rendered_user_prompt=rendered_user_prompt,
|
|
858
863
|
)
|
|
859
864
|
|
|
860
865
|
# Track usage
|
|
@@ -904,7 +909,7 @@ class FlatAgent:
|
|
|
904
909
|
usage=usage_info,
|
|
905
910
|
rate_limit=rate_limit_info,
|
|
906
911
|
finish_reason=finish_reason,
|
|
907
|
-
rendered_user_prompt=
|
|
912
|
+
rendered_user_prompt=rendered_user_prompt,
|
|
908
913
|
)
|
|
909
914
|
|
|
910
915
|
def _extract_cache_tokens(self, usage: Any) -> tuple[int, int]:
|
|
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
|