idun-agent-schema 0.1.4__py3-none-any.whl → 0.1.6__py3-none-any.whl

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.

Potentially problematic release.


This version of idun-agent-schema might be problematic. Click here for more details.

@@ -1,10 +1,10 @@
1
- """Idun Agent Schema - Centralized Pydantic schemas.
2
-
3
- Public namespaces:
4
- - idun_agent_schema.engine: Engine-related schemas
5
- - idun_agent_schema.manager: Manager-related schemas
6
- - idun_agent_schema.shared: Shared cross-cutting schemas
7
- """
8
-
9
- # Re-export key types for convenience
10
- from .shared.observability import ObservabilityConfig # noqa: F401
1
+ """Idun Agent Schema - Centralized Pydantic schemas.
2
+
3
+ Public namespaces:
4
+ - idun_agent_schema.engine: Engine-related schemas
5
+ - idun_agent_schema.manager: Manager-related schemas
6
+ - idun_agent_schema.shared: Shared cross-cutting schemas
7
+ """
8
+
9
+ # Re-export key types for convenience
10
+ from .shared.observability import ObservabilityConfig # noqa: F401
@@ -1,12 +1,11 @@
1
- """Engine-related schemas."""
2
-
3
- from .agent import BaseAgentConfig # noqa: F401
4
- from .api import ChatRequest, ChatResponse # noqa: F401
5
- from .config import AgentConfig, EngineConfig # noqa: F401
6
- from .haystack import HaystackAgentConfig
7
- from .langgraph import ( # noqa: F401
8
- CheckpointConfig,
9
- LangGraphAgentConfig,
10
- SqliteCheckpointConfig,
11
- )
12
- from .server import ServerAPIConfig, ServerConfig # noqa: F401
1
+ """Engine-related schemas."""
2
+
3
+ from .agent import BaseAgentConfig # noqa: F401
4
+ from .api import ChatRequest, ChatResponse # noqa: F401
5
+ from .config import AgentConfig, EngineConfig # noqa: F401
6
+ from .langgraph import ( # noqa: F401
7
+ CheckpointConfig,
8
+ LangGraphAgentConfig,
9
+ SqliteCheckpointConfig,
10
+ )
11
+ from .server import ServerAPIConfig, ServerConfig # noqa: F401
@@ -1,16 +1,16 @@
1
- """Common agent model definitions (engine)."""
2
-
3
- from typing import Any
4
-
5
- from pydantic import BaseModel, Field
6
-
7
- from idun_agent_schema.shared import ObservabilityConfig
8
-
9
-
10
- class BaseAgentConfig(BaseModel):
11
- """Base model for agent configurations. Extend for specific frameworks."""
12
-
13
- name: str | None = Field(default="Unnamed Agent")
14
- input_schema_definition: dict[str, Any] | None = Field(default_factory=dict)
15
- output_schema_definition: dict[str, Any] | None = Field(default_factory=dict)
16
- observability: ObservabilityConfig | None = Field(default=None)
1
+ """Common agent model definitions (engine)."""
2
+
3
+ from typing import Any
4
+
5
+ from pydantic import BaseModel, Field
6
+
7
+ from idun_agent_schema.shared import ObservabilityConfig
8
+
9
+
10
+ class BaseAgentConfig(BaseModel):
11
+ """Base model for agent configurations. Extend for specific frameworks."""
12
+
13
+ name: str | None = Field(default="Unnamed Agent")
14
+ input_schema_definition: dict[str, Any] | None = Field(default_factory=dict)
15
+ output_schema_definition: dict[str, Any] | None = Field(default_factory=dict)
16
+ observability: ObservabilityConfig | None = Field(default=None)
@@ -1,29 +1,29 @@
1
- """Schemas for engine HTTP API request/response payloads."""
2
-
3
- from pydantic import BaseModel
4
-
5
-
6
- class ChatRequest(BaseModel):
7
- """Request payload for synchronous and streaming chat endpoints.
8
-
9
- Attributes:
10
- session_id: Client-provided session identifier for routing state.
11
- query: Natural language prompt or input for the agent.
12
-
13
- """
14
-
15
- session_id: str
16
- query: str
17
-
18
-
19
- class ChatResponse(BaseModel):
20
- """Response payload for chat endpoints.
21
-
22
- Attributes:
23
- session_id: Echoed session identifier.
24
- response: Agent's textual response.
25
-
26
- """
27
-
28
- session_id: str
29
- response: str
1
+ """Schemas for engine HTTP API request/response payloads."""
2
+
3
+ from pydantic import BaseModel
4
+
5
+
6
+ class ChatRequest(BaseModel):
7
+ """Request payload for synchronous and streaming chat endpoints.
8
+
9
+ Attributes:
10
+ session_id: Client-provided session identifier for routing state.
11
+ query: Natural language prompt or input for the agent.
12
+
13
+ """
14
+
15
+ session_id: str
16
+ query: str
17
+
18
+
19
+ class ChatResponse(BaseModel):
20
+ """Response payload for chat endpoints.
21
+
22
+ Attributes:
23
+ session_id: Echoed session identifier.
24
+ response: Agent's textual response.
25
+
26
+ """
27
+
28
+ session_id: str
29
+ response: str
@@ -1,6 +1,6 @@
1
1
  """Top-level engine configuration models."""
2
2
 
3
- from typing import Literal, Any
3
+ from typing import Literal
4
4
 
5
5
  from pydantic import BaseModel, Field
6
6
 
@@ -15,12 +15,7 @@ class AgentConfig(BaseModel):
15
15
  """Configuration for agent specification and settings."""
16
16
 
17
17
  type: Literal["langgraph", "ADK", "CREWAI", "haystack"] = Field(default="langgraph")
18
- config: Any = Field(description="Specific agent config")
19
-
20
-
21
- config: BaseAgentConfig | HaystackAgentConfig | LangGraphAgentConfig = Field(
22
- default_factory=BaseAgentConfig
23
- )
18
+ config: BaseAgentConfig | HaystackAgentConfig | LangGraphAgentConfig
24
19
 
25
20
 
26
21
  class EngineConfig(BaseModel):
@@ -1,13 +1,13 @@
1
- """Configuration models for Haystack agents."""
2
-
3
- from typing import Literal
4
-
5
- from .agent import BaseAgentConfig
6
-
7
-
8
- class HaystackAgentConfig(BaseAgentConfig):
9
- """Configuration model for Haystack Agents."""
10
-
11
- type: Literal["haystack"] = "haystack"
12
- component_type: Literal["pipeline", "agent"]
13
- component_definition: str
1
+ """Configuration models for Haystack agents."""
2
+
3
+ from typing import Literal
4
+
5
+ from idun_agent_engine.core.engine_config import BaseAgentConfig
6
+
7
+
8
+ class HaystackAgentConfig(BaseAgentConfig):
9
+ """Configuration model for Haystack Agents."""
10
+
11
+ type: Literal["haystack"] = "haystack"
12
+ component_type: Literal["pipeline", "agent"]
13
+ component_definition: str
@@ -1,47 +1,47 @@
1
- """Configuration models for LangGraph agents (engine)."""
2
-
3
- from typing import Any, Literal
4
- from urllib.parse import urlparse
5
-
6
- from pydantic import BaseModel, field_validator
7
-
8
- from .agent import BaseAgentConfig
9
-
10
-
11
- class SqliteCheckpointConfig(BaseModel):
12
- """Configuration for SQLite checkpointer."""
13
-
14
- type: Literal["sqlite"]
15
- db_url: str
16
-
17
- @field_validator("db_url")
18
- @classmethod
19
- def db_url_must_be_sqlite(cls, v: str) -> str:
20
- """Ensure the provided database URL uses the sqlite scheme.
21
-
22
- Raises:
23
- ValueError: If the URL does not start with 'sqlite:///'.
24
-
25
- """
26
- if not v.startswith("sqlite:///"):
27
- raise ValueError("SQLite DB URL must start with 'sqlite:///'")
28
- return v
29
-
30
- @property
31
- def db_path(self) -> str:
32
- """Return filesystem path component derived from the sqlite URL."""
33
- path = urlparse(self.db_url).path
34
- if self.db_url.startswith("sqlite:///"):
35
- return path.lstrip("/")
36
- return path
37
-
38
-
39
- CheckpointConfig = SqliteCheckpointConfig
40
-
41
-
42
- class LangGraphAgentConfig(BaseAgentConfig):
43
- """Configuration model for LangGraph agents."""
44
-
45
- graph_definition: str
46
- checkpointer: CheckpointConfig | None = None
47
- store: dict[str, Any] | None = None
1
+ """Configuration models for LangGraph agents (engine)."""
2
+
3
+ from typing import Any, Literal
4
+ from urllib.parse import urlparse
5
+
6
+ from pydantic import BaseModel, field_validator
7
+
8
+ from .agent import BaseAgentConfig
9
+
10
+
11
+ class SqliteCheckpointConfig(BaseModel):
12
+ """Configuration for SQLite checkpointer."""
13
+
14
+ type: Literal["sqlite"]
15
+ db_url: str
16
+
17
+ @field_validator("db_url")
18
+ @classmethod
19
+ def db_url_must_be_sqlite(cls, v: str) -> str:
20
+ """Ensure the provided database URL uses the sqlite scheme.
21
+
22
+ Raises:
23
+ ValueError: If the URL does not start with 'sqlite:///'.
24
+
25
+ """
26
+ if not v.startswith("sqlite:///"):
27
+ raise ValueError("SQLite DB URL must start with 'sqlite:///'")
28
+ return v
29
+
30
+ @property
31
+ def db_path(self) -> str:
32
+ """Return filesystem path component derived from the sqlite URL."""
33
+ path = urlparse(self.db_url).path
34
+ if self.db_url.startswith("sqlite:///"):
35
+ return path.lstrip("/")
36
+ return path
37
+
38
+
39
+ CheckpointConfig = SqliteCheckpointConfig
40
+
41
+
42
+ class LangGraphAgentConfig(BaseAgentConfig):
43
+ """Configuration model for LangGraph agents."""
44
+
45
+ graph_definition: str
46
+ checkpointer: CheckpointConfig | None = None
47
+ store: dict[str, Any] | None = None
@@ -1,15 +1,15 @@
1
- """Server configuration models (engine)."""
2
-
3
- from pydantic import BaseModel, Field
4
-
5
-
6
- class ServerAPIConfig(BaseModel):
7
- """API server configuration."""
8
-
9
- port: int = 8000
10
-
11
-
12
- class ServerConfig(BaseModel):
13
- """Configuration for the Engine's universal settings."""
14
-
15
- api: ServerAPIConfig = Field(default_factory=ServerAPIConfig)
1
+ """Server configuration models (engine)."""
2
+
3
+ from pydantic import BaseModel, Field
4
+
5
+
6
+ class ServerAPIConfig(BaseModel):
7
+ """API server configuration."""
8
+
9
+ port: int = 8000
10
+
11
+
12
+ class ServerConfig(BaseModel):
13
+ """Configuration for the Engine's universal settings."""
14
+
15
+ api: ServerAPIConfig = Field(default_factory=ServerAPIConfig)
@@ -1,50 +1,50 @@
1
- """Manager-related schemas."""
2
-
3
- from .api import ( # noqa: F401
4
- AgentCreateRequest,
5
- AgentResponse,
6
- AgentRunRequest,
7
- AgentRunResponse,
8
- AgentRunSummaryResponse,
9
- AgentStatsResponse,
10
- AgentSummaryResponse,
11
- AgentUpdateRequest,
12
- PaginatedAgentsResponse,
13
- PaginatedResponse,
14
- PaginatedRunsResponse,
15
- )
16
- from .deps import Principal # noqa: F401
17
- from .domain import ( # noqa: F401
18
- AgentEntity,
19
- AgentFramework,
20
- AgentRunEntity,
21
- AgentStatus,
22
- TenantEntity,
23
- TenantPlan,
24
- TenantStatus,
25
- TenantUserEntity,
26
- )
27
- from .dto import ( # noqa: F401
28
- AgentCreateDTO,
29
- AgentDeploymentDTO,
30
- AgentHealthDTO,
31
- AgentMetricsDTO,
32
- AgentRunCreateDTO,
33
- AgentUpdateDTO,
34
- TenantCreateDTO,
35
- TenantQuotaDTO,
36
- TenantUpdateDTO,
37
- TenantUsageDTO,
38
- TenantUserCreateDTO,
39
- TenantUserUpdateDTO,
40
- )
41
- from .errors import ProblemDetail # noqa: F401
42
- from .settings import ( # noqa: F401
43
- APISettings,
44
- AuthSettings,
45
- CelerySettings,
46
- DatabaseSettings,
47
- ObservabilitySettings,
48
- RedisSettings,
49
- Settings,
50
- )
1
+ """Manager-related schemas."""
2
+
3
+ from .api import ( # noqa: F401
4
+ AgentCreateRequest,
5
+ AgentResponse,
6
+ AgentRunRequest,
7
+ AgentRunResponse,
8
+ AgentRunSummaryResponse,
9
+ AgentStatsResponse,
10
+ AgentSummaryResponse,
11
+ AgentUpdateRequest,
12
+ PaginatedAgentsResponse,
13
+ PaginatedResponse,
14
+ PaginatedRunsResponse,
15
+ )
16
+ from .deps import Principal # noqa: F401
17
+ from .domain import ( # noqa: F401
18
+ AgentEntity,
19
+ AgentFramework,
20
+ AgentRunEntity,
21
+ AgentStatus,
22
+ TenantEntity,
23
+ TenantPlan,
24
+ TenantStatus,
25
+ TenantUserEntity,
26
+ )
27
+ from .dto import ( # noqa: F401
28
+ AgentCreateDTO,
29
+ AgentDeploymentDTO,
30
+ AgentHealthDTO,
31
+ AgentMetricsDTO,
32
+ AgentRunCreateDTO,
33
+ AgentUpdateDTO,
34
+ TenantCreateDTO,
35
+ TenantQuotaDTO,
36
+ TenantUpdateDTO,
37
+ TenantUsageDTO,
38
+ TenantUserCreateDTO,
39
+ TenantUserUpdateDTO,
40
+ )
41
+ from .errors import ProblemDetail # noqa: F401
42
+ from .settings import ( # noqa: F401
43
+ APISettings,
44
+ AuthSettings,
45
+ CelerySettings,
46
+ DatabaseSettings,
47
+ ObservabilitySettings,
48
+ RedisSettings,
49
+ Settings,
50
+ )