flatagents 4.2.0__tar.gz → 4.2.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.
- {flatagents-4.2.0 → flatagents-4.2.1}/AGENTS.md +1 -1
- {flatagents-4.2.0 → flatagents-4.2.1}/PKG-INFO +1 -1
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/__init__.py +1 -1
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/assets/flatagent.d.ts +1 -1
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/assets/flatagent.slim.d.ts +1 -1
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/assets/flatagents-runtime.d.ts +1 -1
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/assets/flatagents-runtime.schema.json +1 -1
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/assets/flatagents-runtime.slim.d.ts +1 -1
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/assets/flatmachine.d.ts +1 -1
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/assets/flatmachine.slim.d.ts +1 -1
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/assets/profile.d.ts +1 -1
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/assets/profile.slim.d.ts +1 -1
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/assets/prompt.d.ts +1 -1
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/assets/prompt.slim.d.ts +1 -1
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/flatagent.py +7 -2
- {flatagents-4.2.0 → flatagents-4.2.1}/pyproject.toml +1 -1
- {flatagents-4.2.0 → flatagents-4.2.1}/.gitignore +0 -0
- {flatagents-4.2.0 → flatagents-4.2.1}/README.md +0 -0
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/adapters/__init__.py +0 -0
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/adapters/call_throttle.py +0 -0
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/adapters/claude_code.py +0 -0
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/adapters/claude_code_sessions.py +0 -0
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/adapters/codex_cli.py +0 -0
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/adapters/codex_cli_sessions.py +0 -0
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/adapters/compat.py +0 -0
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/adapters/pi_agent_bridge.py +0 -0
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/adapters/pi_agent_runner.mjs +0 -0
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/adapters/smolagents.py +0 -0
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/assets/README.md +0 -0
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/assets/__init__.py +0 -0
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/assets/flatagent.schema.json +0 -0
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/assets/flatmachine.schema.json +0 -0
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/assets/profile.schema.json +0 -0
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/assets/prompt.schema.json +0 -0
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/baseagent.py +0 -0
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/monitoring.py +0 -0
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/profiles.py +0 -0
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/providers/__init__.py +0 -0
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/providers/anthropic.py +0 -0
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/providers/cerebras.py +0 -0
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/providers/github_copilot_auth.py +0 -0
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/providers/github_copilot_client.py +0 -0
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/providers/github_copilot_login.py +0 -0
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/providers/github_copilot_types.py +0 -0
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/providers/openai.py +0 -0
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/providers/openai_codex_auth.py +0 -0
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/providers/openai_codex_client.py +0 -0
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/providers/openai_codex_login.py +0 -0
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/providers/openai_codex_types.py +0 -0
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/tests/__init__.py +0 -0
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/tests/test_monitoring.py +0 -0
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/tests/test_profiles.py +0 -0
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/tool_loop.py +0 -0
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/tools.py +0 -0
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/utils.py +0 -0
- {flatagents-4.2.0 → flatagents-4.2.1}/flatagents/validation.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: flatagents
|
|
3
|
-
Version: 4.2.
|
|
3
|
+
Version: 4.2.1
|
|
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
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const SPEC_VERSION = "4.2.
|
|
1
|
+
export const SPEC_VERSION = "4.2.1";
|
|
2
2
|
import { PromptWrapper, PromptData, PromptRef, OutputSchema, MCPConfig, ToolDefinition, } from "./prompt";
|
|
3
3
|
import { ProfileWrapper, ProfileData, ProfileRef, ModelConfig, OAuthConfig, } from "./profile";
|
|
4
4
|
export interface AgentWrapper {
|
|
@@ -252,7 +252,7 @@ export interface BackendConfig {
|
|
|
252
252
|
dynamodb_table?: string;
|
|
253
253
|
aws_region?: string;
|
|
254
254
|
}
|
|
255
|
-
export const SPEC_VERSION = "4.2.
|
|
255
|
+
export const SPEC_VERSION = "4.2.1";
|
|
256
256
|
export interface SDKRuntimeWrapper {
|
|
257
257
|
spec: "flatagents-runtime";
|
|
258
258
|
spec_version: typeof SPEC_VERSION;
|
|
@@ -190,7 +190,7 @@ waiting_channel - Signal channel this machine is blocked on (v1.2.0)
|
|
|
190
190
|
config_hash - Content-addressed machine config key for cross-SDK resume (v2.1.0)
|
|
191
191
|
*/
|
|
192
192
|
|
|
193
|
-
export const SPEC_VERSION = "4.2.
|
|
193
|
+
export const SPEC_VERSION = "4.2.1";
|
|
194
194
|
|
|
195
195
|
export interface MachineWrapper {
|
|
196
196
|
spec: "flatmachine";
|
|
@@ -491,7 +491,7 @@ class FlatAgent:
|
|
|
491
491
|
"""Apply resolved llm model config to instance attributes."""
|
|
492
492
|
provider = model_config.get('provider')
|
|
493
493
|
model_name = model_config.get('name')
|
|
494
|
-
if provider and model_name and
|
|
494
|
+
if provider and model_name and f"{provider}/" not in str(model_name) and f"{provider}:" not in str(model_name):
|
|
495
495
|
full_model_name = f"{provider}/{model_name}"
|
|
496
496
|
else:
|
|
497
497
|
full_model_name = model_name
|
|
@@ -923,9 +923,12 @@ class FlatAgent:
|
|
|
923
923
|
input_data: Dict[str, Any],
|
|
924
924
|
tools_prompt: str = "",
|
|
925
925
|
tools: Optional[List[Dict]] = None,
|
|
926
|
+
context: Optional[Dict[str, Any]] = None,
|
|
926
927
|
) -> str:
|
|
927
928
|
"""
|
|
928
|
-
Render post-history instructions with the same template context as prompts
|
|
929
|
+
Render post-history instructions with the same template context as prompts,
|
|
930
|
+
plus an additional ``context`` variable for data that persists across turns
|
|
931
|
+
(e.g. role state maintained by a FlatMachine tool loop).
|
|
929
932
|
|
|
930
933
|
These instructions are not part of the stored logical conversation. They
|
|
931
934
|
are appended ephemerally to the final submitted user/tool message after
|
|
@@ -951,6 +954,7 @@ class FlatAgent:
|
|
|
951
954
|
tools_prompt=tools_prompt,
|
|
952
955
|
tools=tools or [],
|
|
953
956
|
model=model_config,
|
|
957
|
+
context=context or {},
|
|
954
958
|
)
|
|
955
959
|
|
|
956
960
|
def _messages_with_post_history_instructions(
|
|
@@ -1252,6 +1256,7 @@ class FlatAgent:
|
|
|
1252
1256
|
input_data,
|
|
1253
1257
|
tools_prompt=tools_prompt,
|
|
1254
1258
|
tools=_mcp_tools,
|
|
1259
|
+
context=context,
|
|
1255
1260
|
)
|
|
1256
1261
|
submit_messages = self._messages_with_post_history_instructions(
|
|
1257
1262
|
all_messages,
|
|
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
|
|
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
|